Skip to content

Commit c02dc83

Browse files
committed
k
1 parent 9e87552 commit c02dc83

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/backend.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void DevTools::setupPlatform() {
5757
m_fontTexture->initWithData(pixels, kCCTexture2DPixelFormat_RGBA8888, width, height, CCSize(width, height));
5858
m_fontTexture->retain();
5959

60-
io.Fonts->SetTexID(reinterpret_cast<ImTextureID>(static_cast<unsigned long long>(m_fontTexture->getName())));
60+
io.Fonts->SetTexID(static_cast<ImTextureID>(m_fontTexture->getName()));
6161

6262
// fixes getMousePos to be relative to the GD view
6363
#ifndef GEODE_IS_MOBILE
@@ -219,7 +219,7 @@ void DevTools::renderDrawDataFallback(ImDrawData* draw_data) {
219219
auto* idxBuffer = list->IdxBuffer.Data;
220220
auto* vtxBuffer = list->VtxBuffer.Data;
221221
for (auto& cmd : list->CmdBuffer) {
222-
ccGLBindTexture2D(static_cast<GLuint>(reinterpret_cast<unsigned long long>(cmd.GetTexID())));
222+
ccGLBindTexture2D(static_cast<GLuint>(cmd.GetTexID()));
223223

224224
const auto rect = cmd.ClipRect;
225225
const auto orig = toCocos(ImVec2(rect.x, rect.y));
@@ -306,7 +306,7 @@ void DevTools::renderDrawData(ImDrawData* draw_data) {
306306
glBufferData(GL_ELEMENT_ARRAY_BUFFER, list->IdxBuffer.Size * sizeof(ImDrawIdx), list->IdxBuffer.Data, GL_STREAM_DRAW);
307307

308308
for (auto& cmd : list->CmdBuffer) {
309-
ccGLBindTexture2D(static_cast<GLuint>(reinterpret_cast<unsigned long long>(cmd.GetTexID())));
309+
ccGLBindTexture2D(static_cast<GLuint>(cmd.GetTexID()));
310310

311311
const auto rect = cmd.ClipRect;
312312
const auto orig = toCocos(ImVec2(rect.x, rect.y));

src/platform/platform.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void GLRenderCtx::cleanup() {
4343
GLRenderCtx::GLRenderCtx(ImVec2 const& size) : m_size(size) {}
4444

4545
ImTextureID GLRenderCtx::texture() const {
46-
return reinterpret_cast<ImTextureID>(static_cast<unsigned long long>(m_texture));
46+
return static_cast<ImTextureID>(m_texture);
4747
}
4848

4949
ImVec2 GLRenderCtx::size() const {

0 commit comments

Comments
 (0)