Giter VIP home page Giter VIP logo

cloned.softpixelengine's Introduction

#SoftPixelEngine Cloned from http://sourceforge.net/projects/softpixelengine/, http://softpixelengine.sourceforge.net/

#Description The SoftPixel Engine is an OpenSource high level realtime 3D engine for C++ (GNU C++ & VisualC++). It supports Direct3D11, Direct3D9, OpenGL 1.1 - 4.1, OpenGL|ES 1.1 and OpenGL|ES 2.0 and runs on Windows, Linux, Android and iOS.

#Features Renderer independent: Direct3D11, Direct3D9, OpenGL 1.1 - 4.1, OpenGL|ES 1.1, OpenGL|ES 2.0 Platform independent: Windows, Linux, Android, iOS Integrated sub-systems: SoundSystem, NetworkSystem Wrappers for C#, VisualBasic, BlitzBasic, PureBasic, FreePascal Very easy and good for beginners in graphics programming Project files for: Code::Blocks (GCC), VisualStudio 2008, VisualStudio 2010 and VisualStudio 2012 Shader Model 1.0 - 5.0, Cg, GLSL, HLSL, GLSL|ES, Tessellation, Compute Shader (for GPGPU) Integrated PhysicsEngine (NewtonGameDynamics) DeferredRenderer

Getting started with a very small program (C++ & SoftPixel Engine v.3.2):
// SoftPixel Engine - Getting started
#include <SoftPixelEngine.hpp>
using namespace sp; // Main namespace
int main()
{
// The softpixel-device opens the screen (windowed screen / fullscreen are possible)
SoftPixelDevice* spDevice = createGraphicsDevice(
    video::RENDERER_OPENGL, dim::size2di(640, 480), 32, "Getting Started"
);
video::RenderSystem* spRenderer = spDevice->getRenderSystem(); // Render system for drawing operations
video::RenderContext* spContext = spDevice->getRenderContext(); // Render context for back buffer controll
io::InputControl* spControl = spDevice->getInputControl(); // Controller for keyboard- and the mouse input events
scene::SceneGraph* spScene = spDevice->createSceneGraph(); // Scene graph system to handle a lots of scene objects
spScene->setLighting(true); // Activates global lighting
scene::Camera* Cam = spScene->createCamera(); // Creates a camera to see our scene
scene::Light* Light = spScene->createLight(); // Creates a light (by default Directional light)
scene::Mesh* Obj = spScene->createMesh(scene::MESH_TEAPOT); // Creates one of the 16 standard objects
Obj->setPosition(dim::vector3df(0, 0, 2.5)); // Sets the object position (x, y, z)
// The main loop will update our device
while (spDevice->updateEvents() && !spControl->keyDown(io::KEY_ESCAPE))
{
    spRenderer->clearBuffers(); // Clears the video buffers (pixel- and depth buffer)     
    spScene->renderScene(); // Renders the scene     
    Obj->turn(dim::vector3df(1, 1, 1)); // Rotates our object     
    spContext->flipBuffers(); // Swaps the video buffer, so we can see the current frame
}

deleteDevice(); // Deletes the device context and closes the screen
return 0;
}
// END-OF-LINE 

cloned.softpixelengine's People

Contributors

lukasbanana avatar bekasov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.