|
|
@@ -34,6 +34,13 @@ ShellRenderInterfaceOpenGL::ShellRenderInterfaceOpenGL()
|
|
|
{
|
|
|
}
|
|
|
|
|
|
+void ShellRenderInterfaceOpenGL::SetViewport(int width, int height)
|
|
|
+{
|
|
|
+ m_width = width;
|
|
|
+ m_height = height;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
// Called by Rocket when it wants to render geometry that it does not wish to optimise.
|
|
|
void ShellRenderInterfaceOpenGL::RenderGeometry(Rocket::Core::Vertex* vertices, int ROCKET_UNUSED(num_vertices), int* indices, int num_indices, const Rocket::Core::TextureHandle texture, const Rocket::Core::Vector2f& translation)
|
|
|
{
|
|
|
@@ -90,7 +97,7 @@ void ShellRenderInterfaceOpenGL::EnableScissorRegion(bool enable)
|
|
|
// Called by Rocket when it wants to change the scissor region.
|
|
|
void ShellRenderInterfaceOpenGL::SetScissorRegion(int x, int y, int width, int height)
|
|
|
{
|
|
|
- glScissor(x, 768 - (y + height), width, height);
|
|
|
+ glScissor(x, m_height - (y + height), width, height);
|
|
|
}
|
|
|
|
|
|
// Set to byte packing, or the compiler will expand our struct, which means it won't read correctly from file
|