From d3912a9ffed8fea3a7039c893730593d895c24ca Mon Sep 17 00:00:00 2001 From: kearwood Date: Wed, 21 Sep 2022 17:59:23 -0700 Subject: [PATCH] Vulkan refactoring - Replaced GLint with int. --- kraken/KRCamera.cpp | 2 +- kraken/KRCamera.h | 10 +++++----- kraken/KRLight.cpp | 4 ++-- kraken/KRLight.h | 6 +++--- kraken/KROctreeNode.h | 2 +- kraken/KRScene.cpp | 2 +- kraken/KRTextureAnimated.cpp | 2 +- kraken/KRTextureTGA.cpp | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/kraken/KRCamera.cpp b/kraken/KRCamera.cpp index 5af123e..b36eea5 100755 --- a/kraken/KRCamera.cpp +++ b/kraken/KRCamera.cpp @@ -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.. /* diff --git a/kraken/KRCamera.h b/kraken/KRCamera.h index 0a9f5e8..e5913ba 100755 --- a/kraken/KRCamera.h +++ b/kraken/KRCamera.h @@ -79,15 +79,15 @@ public: const std::string getSkyBox() const; private: - void createBuffers(GLint renderBufferWidth, GLint renderBufferHeight); + void createBuffers(int renderBufferWidth, int renderBufferHeight); - GLint volumetricBufferWidth, volumetricBufferHeight; + int volumetricBufferWidth, volumetricBufferHeight; - GLuint compositeFramebuffer, compositeDepthTexture, compositeColorTexture; - GLuint lightAccumulationBuffer, lightAccumulationTexture; + int compositeFramebuffer, compositeDepthTexture, compositeColorTexture; + int lightAccumulationBuffer, lightAccumulationTexture; - GLuint volumetricLightAccumulationBuffer, volumetricLightAccumulationTexture; + int volumetricLightAccumulationBuffer, volumetricLightAccumulationTexture; void renderPost(VkCommandBuffer& commandBuffer, KRSurface& surface); diff --git a/kraken/KRLight.cpp b/kraken/KRLight.cpp index aece174..dcf2983 100755 --- a/kraken/KRLight.cpp +++ b/kraken/KRLight.cpp @@ -393,7 +393,7 @@ void KRLight::render(RenderInfo& ri) if (m_flareTexture.size() && m_flareSize > 0.0f) { if (m_occlusionQuery) { - GLuint params = 0; + int params = 0; GLDEBUG(glGetQueryObjectuivEXT(m_occlusionQuery, GL_QUERY_RESULT_EXT, ¶ms)); GLDEBUG(glDeleteQueriesEXT(1, &m_occlusionQuery)); @@ -559,7 +559,7 @@ int KRLight::getShadowBufferCount() return cBuffers; } -GLuint* KRLight::getShadowTextures() +int* KRLight::getShadowTextures() { return shadowDepthTexture; } diff --git a/kraken/KRLight.h b/kraken/KRLight.h index 8a8ed29..e86427d 100755 --- a/kraken/KRLight.h +++ b/kraken/KRLight.h @@ -67,7 +67,7 @@ public: virtual void render(RenderInfo& ri); int getShadowBufferCount(); - GLuint* getShadowTextures(); + int* getShadowTextures(); KRViewport* getShadowViewports(); @@ -89,12 +89,12 @@ protected: float m_dust_particle_size; 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 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]; KRViewport m_shadowViewports[KRENGINE_MAX_SHADOW_BUFFERS]; diff --git a/kraken/KROctreeNode.h b/kraken/KROctreeNode.h index ba92d94..6da47ac 100755 --- a/kraken/KROctreeNode.h +++ b/kraken/KROctreeNode.h @@ -66,7 +66,7 @@ public: void endOcclusionQuery(); - GLuint m_occlusionQuery; + int m_occlusionQuery; bool m_occlusionTested; bool m_activeQuery; diff --git a/kraken/KRScene.cpp b/kraken/KRScene.cpp index 466b127..6db3a01 100755 --- a/kraken/KRScene.cpp +++ b/kraken/KRScene.cpp @@ -192,7 +192,7 @@ void KRScene::render(KRNode::RenderInfo& ri, KROctreeNode* pOctreeNode, unordere if (bOcclusionResultsPass) { // ----====---- Occlusion results pass ----====---- if (pOctreeNode->m_occlusionTested) { - GLuint params = 0; + int params = 0; GLDEBUG(glGetQueryObjectuivEXT(pOctreeNode->m_occlusionQuery, GL_QUERY_RESULT_EXT, ¶ms)); if (params) { diff --git a/kraken/KRTextureAnimated.cpp b/kraken/KRTextureAnimated.cpp index 2e05f5f..d2966fb 100755 --- a/kraken/KRTextureAnimated.cpp +++ b/kraken/KRTextureAnimated.cpp @@ -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. /* -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? KRTexture::bind(texture_unit); diff --git a/kraken/KRTextureTGA.cpp b/kraken/KRTextureTGA.cpp index d2c4ed3..8ffedd7 100755 --- a/kraken/KRTextureTGA.cpp +++ b/kraken/KRTextureTGA.cpp @@ -341,7 +341,7 @@ KRTexture* KRTextureTGA::compress(bool premultiply_alpha) getContext().getTextureManager()->_setActiveTexture(0); - GLuint compressed_handle = 0; + int compressed_handle = 0; GLDEBUG(glGenTextures(1, &compressed_handle)); GLDEBUG(glBindTexture(GL_TEXTURE_2D, compressed_handle)); @@ -372,7 +372,7 @@ KRTexture* KRTextureTGA::compress(bool premultiply_alpha) break; } - GLuint lod_level = 0; + int lod_level = 0; GLint compressed_size = 0; int lod_width = width; while(lod_width > 1) {