Changeset 2750


Ignore:
Timestamp:
Jun 19, 2013, 12:58:46 AM (6 years ago)
Author:
sam
Message:

gpu: create a Renderer and a RenderContext class to handle render states
such as alpha blending, depth test, etc.

Location:
trunk/src
Files:
4 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Makefile.am

    r2587 r2750  
    5151    lol/gpu/shader.h lol/gpu/indexbuffer.h lol/gpu/vertexbuffer.h \
    5252    lol/gpu/framebuffer.h lol/gpu/texture.h lol/gpu/lolfx.h \
     53    lol/gpu/renderer.h lol/gpu/rendercontext.h \
    5354    \
    5455    lol/debug/all.h \
     
    7879    \
    7980    gpu/shader.cpp gpu/indexbuffer.cpp gpu/vertexbuffer.cpp \
    80     gpu/framebuffer.cpp gpu/texture.cpp \
     81    gpu/framebuffer.cpp gpu/texture.cpp gpu/renderer.cpp \
     82    gpu/rendercontext.cpp \
    8183    \
    8284    input/input.cpp input/input.h \
  • trunk/src/lol/gpu/all.h

    r2524 r2750  
    1818#include <lol/gpu/framebuffer.h>
    1919#include <lol/gpu/lolfx.h>
     20#include <lol/gpu/renderer.h>
     21#include <lol/gpu/rendercontext.h>
    2022
    2123#endif // __LOL_GPU_ALL_H__
  • trunk/src/lolcore.vcxproj

    r2652 r2750  
    116116    <ClCompile Include="gpu\lolfx-compiler.cpp" />
    117117    <ClCompile Include="gpu\lolfx.cpp" />
     118    <ClCompile Include="gpu\rendercontext.cpp" />
     119    <ClCompile Include="gpu\renderer.cpp" />
    118120    <ClCompile Include="gpu\shader.cpp" />
    119121    <ClCompile Include="gpu\texture.cpp" />
     
    210212    <ClInclude Include="lol\gpu\indexbuffer.h" />
    211213    <ClInclude Include="lol\gpu\lolfx.h" />
     214    <ClInclude Include="lol\gpu\rendercontext.h" />
     215    <ClInclude Include="lol\gpu\renderer.h" />
    212216    <ClInclude Include="lol\gpu\shader.h" />
    213217    <ClInclude Include="lol\gpu\texture.h" />
  • trunk/src/lolcore.vcxproj.filters

    r2587 r2750  
    112112      <Filter>mesh</Filter>
    113113    </ClCompile>
     114    <ClCompile Include="gpu\rendercontext.cpp">
     115      <Filter>gpu</Filter>
     116    </ClCompile>
     117    <ClCompile Include="gpu\renderer.cpp">
     118      <Filter>gpu</Filter>
     119    </ClCompile>
    114120    <ClCompile Include="gpu\shader.cpp">
    115121      <Filter>gpu</Filter>
     
    561567      <Filter>lol\base</Filter>
    562568    </ClInclude>
     569    <ClInclude Include="lol\gpu\rendercontext.h">
     570      <Filter>lol\gpu</Filter>
     571    </ClInclude>
     572    <ClInclude Include="lol\gpu\renderer.h">
     573      <Filter>lol\gpu</Filter>
     574    </ClInclude>
    563575    <ClInclude Include="lol\gpu\shader.h">
    564576      <Filter>lol\gpu</Filter>
  • trunk/src/video.cpp

    r2629 r2750  
    9292void Video::Setup(ivec2 size)
    9393{
     94    g_renderer = new Renderer();
     95
    9496#if defined USE_D3D9 || defined _XBOX
    9597    VideoData::d3d_ctx = Direct3DCreate9(D3D_SDK_VERSION);
     
    403405void Video::Destroy()
    404406{
    405     ;
     407    delete g_renderer;
     408    g_renderer = nullptr;
    406409}
    407410
  • trunk/src/video.h

    r2591 r2750  
    6767public:
    6868    static void Setup(ivec2 size);
     69    static void Destroy();
     70
    6971    static void SetCustomSize(ivec2 size);
    7072    static void RestoreSize();
    71     static void Destroy();
    7273    static void SetFov(float theta);
    7374    static void SetDepth(bool set);
Note: See TracChangeset for help on using the changeset viewer.