Made scissor rect/viewport Recti instead of Rectui
Also greatly optimized Renderer::Get[ScissorRect|Viewport] Former-commit-id: 87945543144216715520a4c3ab30629636995afd
This commit is contained in:
@@ -13,9 +13,10 @@
|
||||
#include <GL3/glcorearb.h>
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Core/String.hpp>
|
||||
#include <Nazara/Utility/Enums.hpp>
|
||||
#include <Nazara/Math/Rect.hpp>
|
||||
#include <Nazara/Renderer/Enums.hpp>
|
||||
#include <Nazara/Renderer/RenderStates.hpp>
|
||||
#include <Nazara/Utility/Enums.hpp>
|
||||
|
||||
// Inclusion des extensions
|
||||
#include <GL3/glext.h>
|
||||
@@ -47,6 +48,8 @@ enum nzOpenGLExtension
|
||||
};
|
||||
|
||||
class NzContext;
|
||||
class NzRenderTarget;
|
||||
|
||||
using NzOpenGLFunc = void (*)();
|
||||
|
||||
class NAZARA_API NzOpenGL
|
||||
@@ -75,9 +78,11 @@ class NAZARA_API NzOpenGL
|
||||
|
||||
static void BindBuffer(nzBufferType type, GLuint id);
|
||||
static void BindProgram(GLuint id);
|
||||
static void BindScissorBox(const NzRecti& scissorBox);
|
||||
static void BindTexture(nzImageType type, GLuint id);
|
||||
static void BindTexture(unsigned int textureUnit, nzImageType type, GLuint id);
|
||||
static void BindTextureUnit(unsigned int textureUnit);
|
||||
static void BindViewport(const NzRecti& viewport);
|
||||
|
||||
static void DeleteBuffer(nzBufferType type, GLuint id);
|
||||
static void DeleteProgram(GLuint id);
|
||||
@@ -85,12 +90,16 @@ class NAZARA_API NzOpenGL
|
||||
|
||||
static GLuint GetCurrentBuffer(nzBufferType type);
|
||||
static GLuint GetCurrentProgram();
|
||||
static const NzRenderTarget* GetCurrentTarget();
|
||||
static NzRecti GetCurrentScissorBox();
|
||||
static GLuint GetCurrentTexture();
|
||||
static GLuint GetCurrentTexture(unsigned int textureUnit);
|
||||
static unsigned int GetCurrentTextureUnit();
|
||||
static NzRecti GetCurrentViewport();
|
||||
|
||||
static NzOpenGLFunc GetEntry(const NzString& entryPoint);
|
||||
static unsigned int GetGLSLVersion();
|
||||
static NzString GetRendererName();
|
||||
static unsigned int GetTextureUnit();
|
||||
static NzString GetVendorName();
|
||||
static unsigned int GetVersion();
|
||||
|
||||
@@ -101,10 +110,13 @@ class NAZARA_API NzOpenGL
|
||||
static bool IsSupported(const NzString& string);
|
||||
|
||||
static void SetBuffer(nzBufferType type, GLuint id);
|
||||
static void SetScissorBox(const NzRecti& scissorBox);
|
||||
static void SetProgram(GLuint id);
|
||||
static void SetTarget(const NzRenderTarget* renderTarget);
|
||||
static void SetTexture(GLuint id);
|
||||
static void SetTexture(unsigned int textureUnit, GLuint id);
|
||||
static void SetTextureUnit(unsigned int textureUnit);
|
||||
static void SetViewport(const NzRecti& viewport);
|
||||
|
||||
static bool TranslateFormat(nzPixelFormat pixelFormat, Format* format, FormatType target);
|
||||
|
||||
|
||||
@@ -56,10 +56,10 @@ class NAZARA_API NzRenderer
|
||||
static unsigned int GetMaxVertexAttribs();
|
||||
static float GetPointSize();
|
||||
static const NzRenderStates& GetRenderStates();
|
||||
static NzRectui GetScissorRect();
|
||||
static NzRecti GetScissorRect();
|
||||
static const NzShaderProgram* GetShaderProgram();
|
||||
static const NzRenderTarget* GetTarget();
|
||||
static NzRectui GetViewport();
|
||||
static NzRecti GetViewport();
|
||||
|
||||
static bool HasCapability(nzRendererCap capability);
|
||||
|
||||
@@ -81,7 +81,7 @@ class NAZARA_API NzRenderer
|
||||
static void SetMatrix(nzMatrixType type, const NzMatrix4f& matrix);
|
||||
static void SetPointSize(float size);
|
||||
static void SetRenderStates(const NzRenderStates& states);
|
||||
static void SetScissorRect(const NzRectui& viewport);
|
||||
static void SetScissorRect(const NzRecti& rect);
|
||||
static void SetShaderProgram(const NzShaderProgram* shader);
|
||||
static void SetStencilCompareFunction(nzRendererComparison compareFunc);
|
||||
static void SetStencilFailOperation(nzStencilOperation failOperation);
|
||||
@@ -93,7 +93,7 @@ class NAZARA_API NzRenderer
|
||||
static void SetTexture(nzUInt8 unit, const NzTexture* texture);
|
||||
static void SetTextureSampler(nzUInt8 textureUnit, const NzTextureSampler& sampler);
|
||||
static void SetVertexBuffer(const NzVertexBuffer* vertexBuffer);
|
||||
static void SetViewport(const NzRectui& viewport);
|
||||
static void SetViewport(const NzRecti& viewport);
|
||||
|
||||
static void Uninitialize();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user