Skip to content

Commit 0070445

Browse files
committedApr 7, 2014
Simple test shaders added to platformer
1 parent aa2fe3c commit 0070445

File tree

7 files changed

+107
-1
lines changed

7 files changed

+107
-1
lines changed
 

‎.gitattributes

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

‎engine/prj/vs13/engine.vcxproj

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
<ClInclude Include="..\..\src\video\graphics\driver\graphicsDriver.h" />
113113
<ClInclude Include="..\..\src\video\graphics\driver\openGL\openGLDriver.h" />
114114
<ClInclude Include="..\..\src\video\graphics\driver\openGL\windows\openGLDriverWindows.h" />
115+
<ClInclude Include="..\..\src\video\graphics\renderer\rendererBackEnd.h" />
115116
<ClInclude Include="..\..\src\video\graphics\shader\openGL\openGLShader.h" />
116117
<ClInclude Include="..\..\src\video\graphics\shader\shader.h" />
117118
<ClInclude Include="..\..\src\video\window\window.h" />

‎engine/prj/vs13/engine.vcxproj.filters

+9
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@
5858
<Filter Include="src\video\graphics\shader\openGL">
5959
<UniqueIdentifier>{bdde83ec-408f-413c-9572-82c4221ba5a3}</UniqueIdentifier>
6060
</Filter>
61+
<Filter Include="src\video\graphics\renderer">
62+
<UniqueIdentifier>{b4c5805b-d870-4c60-9a94-921f34517d33}</UniqueIdentifier>
63+
</Filter>
64+
<Filter Include="src\video\graphics\renderer\backend">
65+
<UniqueIdentifier>{da008397-3b92-4190-af72-799293d85199}</UniqueIdentifier>
66+
</Filter>
6167
</ItemGroup>
6268
<ItemGroup>
6369
<ClInclude Include="..\..\src\engine.h">
@@ -120,6 +126,9 @@
120126
<ClInclude Include="..\..\src\video\graphics\shader\openGL\openGLShader.h">
121127
<Filter>src\video\graphics\shader\openGL</Filter>
122128
</ClInclude>
129+
<ClInclude Include="..\..\src\video\graphics\renderer\rendererBackEnd.h">
130+
<Filter>src\video\graphics\renderer\backend</Filter>
131+
</ClInclude>
123132
</ItemGroup>
124133
<ItemGroup>
125134
<None Include="..\..\src\core\memory\stdAllocator.inl">

‎engine/src/engine.inl

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ namespace rev {
3030
core::Platform::startUp(*this);
3131
mMainWindow = create<video::Window>(math::Vec2u(100, 100), math::Vec2u(640, 480), "Rev window");
3232
mGfxDriver = create<video::OpenGLDriver>(mMainWindow);
33+
mGfxDriver->setZCompare(true);
34+
mGfxDriver->setClearColor(video::Color(0.6f, 0.8f, 1.f));
3335
}
3436

3537
//----------------------------------------------------------------------------------------------------------------------
@@ -45,8 +47,8 @@ namespace rev {
4547
if(!core::OSHandler::get()->update())
4648
return false;
4749

48-
mGfxDriver->setClearColor(video::Color(0.f, 1.f, 0.f));
4950
mGfxDriver->clearColorBuffer();
51+
mGfxDriver->clearZBuffer();
5052

5153
mGfxDriver->finishFrame();
5254
return true;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//----------------------------------------------------------------------------------------------------------------------
2+
// Revolution Engine
3+
// Created by Carmelo J. Fdez-Agüera Tortosa (a.k.a. Technik)
4+
// 2014/April/07
5+
//----------------------------------------------------------------------------------------------------------------------
6+
// Render system's back end, the layer right on top of the video driver
7+
#ifndef _REV_VIDEO_GRAPHICS_RENDERER_BACKEND_RENDERERBACKEND_H_
8+
#define _REV_VIDEO_GRAPHICS_RENDERER_BACKEND_RENDERERBACKEND_H_
9+
10+
namespace rev {
11+
namespace video {
12+
13+
class RendererBackEnd {
14+
public:
15+
16+
};
17+
18+
}
19+
}
20+
21+
#endif // _REV_VIDEO_GRAPHICS_RENDERER_BACKEND_BACKENDRENDERER_H_

‎projects/platformer/bin/test.pxl

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
void main (void) {
3+
gl_FragColor = vec4(1.0);
4+
}

‎projects/platformer/bin/test.vtx

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
attribute vec3 vertex;
2+
3+
void main ( void )
4+
{
5+
gl_Position = vec4(vertex, 1.0);
6+
}

0 commit comments

Comments
 (0)
Please sign in to comment.