aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/GPU3D_OpenGL.cpp5
-rw-r--r--src/GPU3D_OpenGL_shaders.h9
-rw-r--r--src/libui_sdl/libui/windows/gl.cpp19
3 files changed, 27 insertions, 6 deletions
diff --git a/src/GPU3D_OpenGL.cpp b/src/GPU3D_OpenGL.cpp
index db2617c..95243d1 100644
--- a/src/GPU3D_OpenGL.cpp
+++ b/src/GPU3D_OpenGL.cpp
@@ -187,7 +187,7 @@ void SetupDefaultTexParams(GLuint tex)
bool Init()
{
GLint uni_id;
-
+
glEnable(GL_DEPTH_TEST);
glEnable(GL_STENCIL_TEST);
@@ -1043,9 +1043,6 @@ void RenderFrame()
{
if (RenderPolygonRAM[i]->Degenerate) continue;
- // zog.
- //if (RenderPolygonRAM[i]->YBottom <= 96 || RenderPolygonRAM[i]->YTop >= 144) continue;
-
SetupPolygon(&PolygonList[npolys], RenderPolygonRAM[i]);
if (firsttrans < 0 && RenderPolygonRAM[i]->Translucent)
firsttrans = npolys;
diff --git a/src/GPU3D_OpenGL_shaders.h b/src/GPU3D_OpenGL_shaders.h
index b12dc61..4c5b82e 100644
--- a/src/GPU3D_OpenGL_shaders.h
+++ b/src/GPU3D_OpenGL_shaders.h
@@ -42,7 +42,7 @@ uniform uint uOpaquePolyID;
uniform uint uFogFlag;
out vec4 oColor;
-out vec3 oAttr;
+out vec4 oAttr;
void main()
{
@@ -50,6 +50,7 @@ void main()
oAttr.r = float(uOpaquePolyID) / 63.0;
oAttr.g = 0;
oAttr.b = float(uFogFlag);
+ oAttr.a = 1;
}
)";
@@ -178,7 +179,7 @@ smooth in vec2 fTexcoord;
flat in ivec3 fPolygonAttr;
out vec4 oColor;
-out vec3 oAttr;
+out vec4 oAttr;
int TexcoordWrap(int c, int maxc, int mode)
{
@@ -620,6 +621,7 @@ void main()
oColor = col;
oAttr.r = float((fPolygonAttr.x >> 24) & 0x3F) / 63.0;
oAttr.b = float((fPolygonAttr.x >> 15) & 0x1);
+ oAttr.a = 1;
}
)";
@@ -635,6 +637,7 @@ void main()
oColor = col;
oAttr.r = float((fPolygonAttr.x >> 24) & 0x3F) / 63.0;
oAttr.b = float((fPolygonAttr.x >> 15) & 0x1);
+ oAttr.a = 1;
gl_FragDepth = fZ;
}
)";
@@ -649,6 +652,7 @@ void main()
oColor = col;
oAttr.b = 0;
+ oAttr.a = 1;
}
)";
@@ -664,6 +668,7 @@ void main()
oColor = col;
oAttr.b = 0;
+ oAttr.a = 1;
gl_FragDepth = fZ;
}
)";
diff --git a/src/libui_sdl/libui/windows/gl.cpp b/src/libui_sdl/libui/windows/gl.cpp
index 1e3732c..c621721 100644
--- a/src/libui_sdl/libui/windows/gl.cpp
+++ b/src/libui_sdl/libui/windows/gl.cpp
@@ -135,8 +135,27 @@ void *uiGLGetProcAddress(const char* proc)
return (void*)wglGetProcAddress(proc);
}
+void uiGLBegin(uiGLContext* ctx)
+{
+}
+
+void uiGLEnd(uiGLContext* ctx)
+{
+}
+
void uiGLSwapBuffers(uiGLContext* ctx)
{
if (ctx == NULL) return;
SwapBuffers(ctx->dc);
}
+
+int uiGLGetFramebuffer(uiGLContext* ctx)
+{
+ return 0;
+}
+
+float uiGLGetFramebufferScale(uiGLContext* ctx)
+{
+ // TODO
+ return 1;
+}