Vulkan refactoring - Replaced GLint with int.

This commit is contained in:
2022-09-21 17:59:23 -07:00
parent ecb1c8a50f
commit d3912a9ffe
8 changed files with 16 additions and 16 deletions

View File

@@ -379,7 +379,7 @@ void KRCamera::renderFrame(VkCommandBuffer& commandBuffer, KRSurface& compositeS
} }
void KRCamera::createBuffers(GLint renderBufferWidth, GLint renderBufferHeight) void KRCamera::createBuffers(int renderBufferWidth, int renderBufferHeight)
{ {
// TODO - Vulkan Refactoring.. // TODO - Vulkan Refactoring..
/* /*

View File

@@ -79,15 +79,15 @@ public:
const std::string getSkyBox() const; const std::string getSkyBox() const;
private: private:
void createBuffers(GLint renderBufferWidth, GLint renderBufferHeight); void createBuffers(int renderBufferWidth, int renderBufferHeight);
GLint volumetricBufferWidth, volumetricBufferHeight; int volumetricBufferWidth, volumetricBufferHeight;
GLuint compositeFramebuffer, compositeDepthTexture, compositeColorTexture; int compositeFramebuffer, compositeDepthTexture, compositeColorTexture;
GLuint lightAccumulationBuffer, lightAccumulationTexture; int lightAccumulationBuffer, lightAccumulationTexture;
GLuint volumetricLightAccumulationBuffer, volumetricLightAccumulationTexture; int volumetricLightAccumulationBuffer, volumetricLightAccumulationTexture;
void renderPost(VkCommandBuffer& commandBuffer, KRSurface& surface); void renderPost(VkCommandBuffer& commandBuffer, KRSurface& surface);

View File

@@ -393,7 +393,7 @@ void KRLight::render(RenderInfo& ri)
if (m_flareTexture.size() && m_flareSize > 0.0f) { if (m_flareTexture.size() && m_flareSize > 0.0f) {
if (m_occlusionQuery) { if (m_occlusionQuery) {
GLuint params = 0; int params = 0;
GLDEBUG(glGetQueryObjectuivEXT(m_occlusionQuery, GL_QUERY_RESULT_EXT, &params)); GLDEBUG(glGetQueryObjectuivEXT(m_occlusionQuery, GL_QUERY_RESULT_EXT, &params));
GLDEBUG(glDeleteQueriesEXT(1, &m_occlusionQuery)); GLDEBUG(glDeleteQueriesEXT(1, &m_occlusionQuery));
@@ -559,7 +559,7 @@ int KRLight::getShadowBufferCount()
return cBuffers; return cBuffers;
} }
GLuint* KRLight::getShadowTextures() int* KRLight::getShadowTextures()
{ {
return shadowDepthTexture; return shadowDepthTexture;
} }

View File

@@ -67,7 +67,7 @@ public:
virtual void render(RenderInfo& ri); virtual void render(RenderInfo& ri);
int getShadowBufferCount(); int getShadowBufferCount();
GLuint* getShadowTextures(); int* getShadowTextures();
KRViewport* getShadowViewports(); KRViewport* getShadowViewports();
@@ -89,12 +89,12 @@ protected:
float m_dust_particle_size; float m_dust_particle_size;
float m_dust_particle_intensity; float m_dust_particle_intensity;
GLuint m_occlusionQuery; // Occlusion query for attenuating occluded flares int m_occlusionQuery; // Occlusion query for attenuating occluded flares
// Shadow Maps // Shadow Maps
int m_cShadowBuffers; int m_cShadowBuffers;
GLuint shadowFramebuffer[KRENGINE_MAX_SHADOW_BUFFERS], shadowDepthTexture[KRENGINE_MAX_SHADOW_BUFFERS]; int shadowFramebuffer[KRENGINE_MAX_SHADOW_BUFFERS], shadowDepthTexture[KRENGINE_MAX_SHADOW_BUFFERS];
bool shadowValid[KRENGINE_MAX_SHADOW_BUFFERS]; bool shadowValid[KRENGINE_MAX_SHADOW_BUFFERS];
KRViewport m_shadowViewports[KRENGINE_MAX_SHADOW_BUFFERS]; KRViewport m_shadowViewports[KRENGINE_MAX_SHADOW_BUFFERS];

View File

@@ -66,7 +66,7 @@ public:
void endOcclusionQuery(); void endOcclusionQuery();
GLuint m_occlusionQuery; int m_occlusionQuery;
bool m_occlusionTested; bool m_occlusionTested;
bool m_activeQuery; bool m_activeQuery;

View File

@@ -192,7 +192,7 @@ void KRScene::render(KRNode::RenderInfo& ri, KROctreeNode* pOctreeNode, unordere
if (bOcclusionResultsPass) { if (bOcclusionResultsPass) {
// ----====---- Occlusion results pass ----====---- // ----====---- Occlusion results pass ----====----
if (pOctreeNode->m_occlusionTested) { if (pOctreeNode->m_occlusionTested) {
GLuint params = 0; int params = 0;
GLDEBUG(glGetQueryObjectuivEXT(pOctreeNode->m_occlusionQuery, GL_QUERY_RESULT_EXT, &params)); GLDEBUG(glGetQueryObjectuivEXT(pOctreeNode->m_occlusionQuery, GL_QUERY_RESULT_EXT, &params));
if (params) { if (params) {

View File

@@ -104,7 +104,7 @@ void KRTextureAnimated::resetPoolExpiry(float lodCoverage, texture_usage_t textu
// TODO - Vulkan refactoring. Perhaps The texture selection for animation should be done in the shader. // TODO - Vulkan refactoring. Perhaps The texture selection for animation should be done in the shader.
/* /*
void KRTextureAnimated::bind(GLuint texture_unit) void KRTextureAnimated::bind(int texture_unit)
{ {
resetPoolExpiry(0.0f, TEXTURE_USAGE_NONE); // TODO - Need to set parameters here for streaming priority? resetPoolExpiry(0.0f, TEXTURE_USAGE_NONE); // TODO - Need to set parameters here for streaming priority?
KRTexture::bind(texture_unit); KRTexture::bind(texture_unit);

View File

@@ -341,7 +341,7 @@ KRTexture* KRTextureTGA::compress(bool premultiply_alpha)
getContext().getTextureManager()->_setActiveTexture(0); getContext().getTextureManager()->_setActiveTexture(0);
GLuint compressed_handle = 0; int compressed_handle = 0;
GLDEBUG(glGenTextures(1, &compressed_handle)); GLDEBUG(glGenTextures(1, &compressed_handle));
GLDEBUG(glBindTexture(GL_TEXTURE_2D, compressed_handle)); GLDEBUG(glBindTexture(GL_TEXTURE_2D, compressed_handle));
@@ -372,7 +372,7 @@ KRTexture* KRTextureTGA::compress(bool premultiply_alpha)
break; break;
} }
GLuint lod_level = 0; int lod_level = 0;
GLint compressed_size = 0; GLint compressed_size = 0;
int lod_width = width; int lod_width = width;
while(lod_width > 1) { while(lod_width > 1) {