Rename GLES2 -> GLES3

This commit is contained in:
Christian Semmler 2025-07-22 16:50:27 -07:00
parent 426958bf7b
commit 7cee468110
No known key found for this signature in database
GPG Key ID: 086DAA1360BEEE5C
4 changed files with 63 additions and 63 deletions

View File

@ -44,16 +44,16 @@ if(NOT WINDOWS_STORE)
message(STATUS "🧩 OpenGL 1.x support not enabled — needs OpenGL") message(STATUS "🧩 OpenGL 1.x support not enabled — needs OpenGL")
endif() endif()
find_library(OPENGL_ES2_LIBRARY NAMES GLESv2) find_library(OPENGL_ES3_LIBRARY NAMES GLESv3)
if(EMSCRIPTEN OR OPENGL_ES2_LIBRARY) if(EMSCRIPTEN OR OPENGL_ES3_LIBRARY)
message(STATUS "Found OpenGL: enabling OpenGL ES 2.x renderer") message(STATUS "Found OpenGL: enabling OpenGL ES 3.x renderer")
target_sources(miniwin PRIVATE src/d3drm/backends/opengles2/renderer.cpp) target_sources(miniwin PRIVATE src/d3drm/backends/opengles3/renderer.cpp)
list(APPEND GRAPHICS_BACKENDS USE_OPENGLES2) list(APPEND GRAPHICS_BACKENDS USE_OPENGLES3)
if(OPENGL_ES2_LIBRARY) if(OPENGL_ES3_LIBRARY)
target_link_libraries(miniwin PRIVATE ${OPENGL_ES2_LIBRARY}) target_link_libraries(miniwin PRIVATE ${OPENGL_ES3_LIBRARY})
endif() endif()
else() else()
message(STATUS "🧩 OpenGL ES 2.x support not enabled") message(STATUS "🧩 OpenGL ES 3.x support not enabled")
endif() endif()
endif() endif()

View File

@ -1,4 +1,4 @@
#include "d3drmrenderer_opengles2.h" #include "d3drmrenderer_opengles3.h"
#include "meshutils.h" #include "meshutils.h"
#include <GLES2/gl2ext.h> #include <GLES2/gl2ext.h>
@ -22,13 +22,13 @@ static GLuint CompileShader(GLenum type, const char* source)
return shader; return shader;
} }
struct SceneLightGLES2 { struct SceneLightGLES3 {
float color[4]; float color[4];
float position[4]; float position[4];
float direction[4]; float direction[4];
}; };
Direct3DRMRenderer* OpenGLES2Renderer::Create(DWORD width, DWORD height, DWORD msaaSamples) Direct3DRMRenderer* OpenGLES3Renderer::Create(DWORD width, DWORD height, DWORD msaaSamples)
{ {
// We have to reset the attributes here after having enumerated the // We have to reset the attributes here after having enumerated the
// OpenGL ES 2.0 renderer, or else SDL gets very confused by SDL_GL_DEPTH_SIZE // OpenGL ES 2.0 renderer, or else SDL gets very confused by SDL_GL_DEPTH_SIZE
@ -173,12 +173,12 @@ Direct3DRMRenderer* OpenGLES2Renderer::Create(DWORD width, DWORD height, DWORD m
glDeleteShader(vs); glDeleteShader(vs);
glDeleteShader(fs); glDeleteShader(fs);
return new OpenGLES2Renderer(width, height, msaaSamples, context, shaderProgram); return new OpenGLES3Renderer(width, height, msaaSamples, context, shaderProgram);
} }
GLES2MeshCacheEntry GLES2UploadMesh(const MeshGroup& meshGroup, bool forceUV = false) GLES3MeshCacheEntry GLES3UploadMesh(const MeshGroup& meshGroup, bool forceUV = false)
{ {
GLES2MeshCacheEntry cache{&meshGroup, meshGroup.version}; GLES3MeshCacheEntry cache{&meshGroup, meshGroup.version};
cache.flat = meshGroup.quality == D3DRMRENDER_FLAT || meshGroup.quality == D3DRMRENDER_UNLITFLAT; cache.flat = meshGroup.quality == D3DRMRENDER_FLAT || meshGroup.quality == D3DRMRENDER_UNLITFLAT;
@ -283,7 +283,7 @@ bool UploadTexture(SDL_Surface* source, GLuint& outTexId, bool isUI)
return true; return true;
} }
OpenGLES2Renderer::OpenGLES2Renderer( OpenGLES3Renderer::OpenGLES3Renderer(
DWORD width, DWORD width,
DWORD height, DWORD height,
DWORD msaaSamples, DWORD msaaSamples,
@ -332,7 +332,7 @@ OpenGLES2Renderer::OpenGLES2Renderer(
{{0.0f, 1.0f, 0.0f}, {0, 0, -1}, {0.0f, 1.0f}} {{0.0f, 1.0f, 0.0f}, {0, 0, -1}, {0.0f, 1.0f}}
}; };
m_uiMesh.indices = {0, 1, 2, 0, 2, 3}; m_uiMesh.indices = {0, 1, 2, 0, 2, 3};
m_uiMeshCache = GLES2UploadMesh(m_uiMesh, true); m_uiMeshCache = GLES3UploadMesh(m_uiMesh, true);
m_posLoc = glGetAttribLocation(m_shaderProgram, "a_position"); m_posLoc = glGetAttribLocation(m_shaderProgram, "a_position");
m_normLoc = glGetAttribLocation(m_shaderProgram, "a_normal"); m_normLoc = glGetAttribLocation(m_shaderProgram, "a_normal");
m_texLoc = glGetAttribLocation(m_shaderProgram, "a_texCoord"); m_texLoc = glGetAttribLocation(m_shaderProgram, "a_texCoord");
@ -354,14 +354,14 @@ OpenGLES2Renderer::OpenGLES2Renderer(
glUseProgram(m_shaderProgram); glUseProgram(m_shaderProgram);
} }
OpenGLES2Renderer::~OpenGLES2Renderer() OpenGLES3Renderer::~OpenGLES3Renderer()
{ {
SDL_DestroySurface(m_renderedImage); SDL_DestroySurface(m_renderedImage);
glDeleteProgram(m_shaderProgram); glDeleteProgram(m_shaderProgram);
SDL_GL_DestroyContext(m_context); SDL_GL_DestroyContext(m_context);
} }
void OpenGLES2Renderer::PushLights(const SceneLight* lightsArray, size_t count) void OpenGLES3Renderer::PushLights(const SceneLight* lightsArray, size_t count)
{ {
if (count > 3) { if (count > 3) {
SDL_Log("Unsupported number of lights (%d)", static_cast<int>(count)); SDL_Log("Unsupported number of lights (%d)", static_cast<int>(count));
@ -371,21 +371,21 @@ void OpenGLES2Renderer::PushLights(const SceneLight* lightsArray, size_t count)
m_lights.assign(lightsArray, lightsArray + count); m_lights.assign(lightsArray, lightsArray + count);
} }
void OpenGLES2Renderer::SetFrustumPlanes(const Plane* frustumPlanes) void OpenGLES3Renderer::SetFrustumPlanes(const Plane* frustumPlanes)
{ {
} }
void OpenGLES2Renderer::SetProjection(const D3DRMMATRIX4D& projection, D3DVALUE front, D3DVALUE back) void OpenGLES3Renderer::SetProjection(const D3DRMMATRIX4D& projection, D3DVALUE front, D3DVALUE back)
{ {
memcpy(&m_projection, projection, sizeof(D3DRMMATRIX4D)); memcpy(&m_projection, projection, sizeof(D3DRMMATRIX4D));
} }
struct TextureDestroyContextGLS2 { struct TextureDestroyContextGLS2 {
OpenGLES2Renderer* renderer; OpenGLES3Renderer* renderer;
Uint32 textureId; Uint32 textureId;
}; };
void OpenGLES2Renderer::AddTextureDestroyCallback(Uint32 id, IDirect3DRMTexture* texture) void OpenGLES3Renderer::AddTextureDestroyCallback(Uint32 id, IDirect3DRMTexture* texture)
{ {
auto* ctx = new TextureDestroyContextGLS2{this, id}; auto* ctx = new TextureDestroyContextGLS2{this, id};
texture->AddDestroyCallback( texture->AddDestroyCallback(
@ -403,7 +403,7 @@ void OpenGLES2Renderer::AddTextureDestroyCallback(Uint32 id, IDirect3DRMTexture*
); );
} }
Uint32 OpenGLES2Renderer::GetTextureId(IDirect3DRMTexture* iTexture, bool isUI, float scaleX, float scaleY) Uint32 OpenGLES3Renderer::GetTextureId(IDirect3DRMTexture* iTexture, bool isUI, float scaleX, float scaleY)
{ {
SDL_GL_MakeCurrent(DDWindow, m_context); SDL_GL_MakeCurrent(DDWindow, m_context);
auto texture = static_cast<Direct3DRMTextureImpl*>(iTexture); auto texture = static_cast<Direct3DRMTextureImpl*>(iTexture);
@ -447,17 +447,17 @@ Uint32 OpenGLES2Renderer::GetTextureId(IDirect3DRMTexture* iTexture, bool isUI,
return (Uint32) (m_textures.size() - 1); return (Uint32) (m_textures.size() - 1);
} }
struct GLES2MeshDestroyContext { struct GLES3MeshDestroyContext {
OpenGLES2Renderer* renderer; OpenGLES3Renderer* renderer;
Uint32 id; Uint32 id;
}; };
void OpenGLES2Renderer::AddMeshDestroyCallback(Uint32 id, IDirect3DRMMesh* mesh) void OpenGLES3Renderer::AddMeshDestroyCallback(Uint32 id, IDirect3DRMMesh* mesh)
{ {
auto* ctx = new GLES2MeshDestroyContext{this, id}; auto* ctx = new GLES3MeshDestroyContext{this, id};
mesh->AddDestroyCallback( mesh->AddDestroyCallback(
[](IDirect3DRMObject*, void* arg) { [](IDirect3DRMObject*, void* arg) {
auto* ctx = static_cast<GLES2MeshDestroyContext*>(arg); auto* ctx = static_cast<GLES3MeshDestroyContext*>(arg);
auto& cache = ctx->renderer->m_meshs[ctx->id]; auto& cache = ctx->renderer->m_meshs[ctx->id];
cache.meshGroup = nullptr; cache.meshGroup = nullptr;
glDeleteBuffers(1, &cache.vboPositions); glDeleteBuffers(1, &cache.vboPositions);
@ -470,19 +470,19 @@ void OpenGLES2Renderer::AddMeshDestroyCallback(Uint32 id, IDirect3DRMMesh* mesh)
); );
} }
Uint32 OpenGLES2Renderer::GetMeshId(IDirect3DRMMesh* mesh, const MeshGroup* meshGroup) Uint32 OpenGLES3Renderer::GetMeshId(IDirect3DRMMesh* mesh, const MeshGroup* meshGroup)
{ {
for (Uint32 i = 0; i < m_meshs.size(); ++i) { for (Uint32 i = 0; i < m_meshs.size(); ++i) {
auto& cache = m_meshs[i]; auto& cache = m_meshs[i];
if (cache.meshGroup == meshGroup) { if (cache.meshGroup == meshGroup) {
if (cache.version != meshGroup->version) { if (cache.version != meshGroup->version) {
cache = std::move(GLES2UploadMesh(*meshGroup)); cache = std::move(GLES3UploadMesh(*meshGroup));
} }
return i; return i;
} }
} }
auto newCache = GLES2UploadMesh(*meshGroup); auto newCache = GLES3UploadMesh(*meshGroup);
for (Uint32 i = 0; i < m_meshs.size(); ++i) { for (Uint32 i = 0; i < m_meshs.size(); ++i) {
auto& cache = m_meshs[i]; auto& cache = m_meshs[i];
@ -498,7 +498,7 @@ Uint32 OpenGLES2Renderer::GetMeshId(IDirect3DRMMesh* mesh, const MeshGroup* mesh
return (Uint32) (m_meshs.size() - 1); return (Uint32) (m_meshs.size() - 1);
} }
HRESULT OpenGLES2Renderer::BeginFrame() HRESULT OpenGLES3Renderer::BeginFrame()
{ {
SDL_GL_MakeCurrent(DDWindow, m_context); SDL_GL_MakeCurrent(DDWindow, m_context);
m_dirty = true; m_dirty = true;
@ -510,7 +510,7 @@ HRESULT OpenGLES2Renderer::BeginFrame()
glEnable(GL_DEPTH_TEST); glEnable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE); glDepthMask(GL_TRUE);
SceneLightGLES2 lightData[3]; SceneLightGLES3 lightData[3];
int lightCount = std::min(static_cast<int>(m_lights.size()), 3); int lightCount = std::min(static_cast<int>(m_lights.size()), 3);
for (int i = 0; i < lightCount; ++i) { for (int i = 0; i < lightCount; ++i) {
@ -540,14 +540,14 @@ HRESULT OpenGLES2Renderer::BeginFrame()
return DD_OK; return DD_OK;
} }
void OpenGLES2Renderer::EnableTransparency() void OpenGLES3Renderer::EnableTransparency()
{ {
glEnable(GL_BLEND); glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDepthMask(GL_FALSE); glDepthMask(GL_FALSE);
} }
void OpenGLES2Renderer::SubmitDraw( void OpenGLES3Renderer::SubmitDraw(
DWORD meshId, DWORD meshId,
const D3DRMMATRIX4D& modelViewMatrix, const D3DRMMATRIX4D& modelViewMatrix,
const D3DRMMATRIX4D& worldMatrix, const D3DRMMATRIX4D& worldMatrix,
@ -606,7 +606,7 @@ void OpenGLES2Renderer::SubmitDraw(
glDisableVertexAttribArray(m_texLoc); glDisableVertexAttribArray(m_texLoc);
} }
HRESULT OpenGLES2Renderer::FinalizeFrame() HRESULT OpenGLES3Renderer::FinalizeFrame()
{ {
glBindBuffer(GL_ARRAY_BUFFER, 0); glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
@ -614,7 +614,7 @@ HRESULT OpenGLES2Renderer::FinalizeFrame()
return DD_OK; return DD_OK;
} }
void OpenGLES2Renderer::Resize(int width, int height, const ViewportTransform& viewportTransform) void OpenGLES3Renderer::Resize(int width, int height, const ViewportTransform& viewportTransform)
{ {
SDL_GL_MakeCurrent(DDWindow, m_context); SDL_GL_MakeCurrent(DDWindow, m_context);
m_width = width; m_width = width;
@ -692,7 +692,7 @@ void OpenGLES2Renderer::Resize(int width, int height, const ViewportTransform& v
glViewport(0, 0, m_width, m_height); glViewport(0, 0, m_width, m_height);
} }
void OpenGLES2Renderer::Clear(float r, float g, float b) void OpenGLES3Renderer::Clear(float r, float g, float b)
{ {
SDL_GL_MakeCurrent(DDWindow, m_context); SDL_GL_MakeCurrent(DDWindow, m_context);
m_dirty = true; m_dirty = true;
@ -705,7 +705,7 @@ void OpenGLES2Renderer::Clear(float r, float g, float b)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
} }
void OpenGLES2Renderer::Flip() void OpenGLES3Renderer::Flip()
{ {
SDL_GL_MakeCurrent(DDWindow, m_context); SDL_GL_MakeCurrent(DDWindow, m_context);
if (!m_dirty) { if (!m_dirty) {
@ -775,7 +775,7 @@ void OpenGLES2Renderer::Flip()
m_dirty = false; m_dirty = false;
} }
void OpenGLES2Renderer::Draw2DImage(Uint32 textureId, const SDL_Rect& srcRect, const SDL_Rect& dstRect, FColor color) void OpenGLES3Renderer::Draw2DImage(Uint32 textureId, const SDL_Rect& srcRect, const SDL_Rect& dstRect, FColor color)
{ {
SDL_GL_MakeCurrent(DDWindow, m_context); SDL_GL_MakeCurrent(DDWindow, m_context);
m_dirty = true; m_dirty = true;
@ -797,7 +797,7 @@ void OpenGLES2Renderer::Draw2DImage(Uint32 textureId, const SDL_Rect& srcRect, c
SDL_Rect expandedDstRect; SDL_Rect expandedDstRect;
if (textureId != NO_TEXTURE_ID) { if (textureId != NO_TEXTURE_ID) {
const GLES2TextureCacheEntry& texture = m_textures[textureId]; const GLES3TextureCacheEntry& texture = m_textures[textureId];
float scaleX = static_cast<float>(dstRect.w) / srcRect.w; float scaleX = static_cast<float>(dstRect.w) / srcRect.w;
float scaleY = static_cast<float>(dstRect.h) / srcRect.h; float scaleY = static_cast<float>(dstRect.h) / srcRect.h;
expandedDstRect = { expandedDstRect = {
@ -863,7 +863,7 @@ void OpenGLES2Renderer::Draw2DImage(Uint32 textureId, const SDL_Rect& srcRect, c
glDisable(GL_SCISSOR_TEST); glDisable(GL_SCISSOR_TEST);
} }
void OpenGLES2Renderer::Download(SDL_Surface* target) void OpenGLES3Renderer::Download(SDL_Surface* target)
{ {
glFinish(); glFinish();
@ -903,7 +903,7 @@ void OpenGLES2Renderer::Download(SDL_Surface* target)
SDL_DestroySurface(bufferClone); SDL_DestroySurface(bufferClone);
} }
void OpenGLES2Renderer::SetDither(bool dither) void OpenGLES3Renderer::SetDither(bool dither)
{ {
if (dither) { if (dither) {
glEnable(GL_DITHER); glEnable(GL_DITHER);

View File

@ -2,8 +2,8 @@
#ifdef USE_OPENGL1 #ifdef USE_OPENGL1
#include "d3drmrenderer_opengl1.h" #include "d3drmrenderer_opengl1.h"
#endif #endif
#ifdef USE_OPENGLES2 #ifdef USE_OPENGLES3
#include "d3drmrenderer_opengles2.h" #include "d3drmrenderer_opengles3.h"
#endif #endif
#ifdef USE_CITRO3D #ifdef USE_CITRO3D
#include "d3drmrenderer_citro3d.h" #include "d3drmrenderer_citro3d.h"
@ -34,9 +34,9 @@ Direct3DRMRenderer* CreateDirect3DRMRenderer(
return new Direct3DRMSoftwareRenderer(DDSDesc.dwWidth, DDSDesc.dwHeight); return new Direct3DRMSoftwareRenderer(DDSDesc.dwWidth, DDSDesc.dwHeight);
} }
#endif #endif
#ifdef USE_OPENGLES2 #ifdef USE_OPENGLES3
if (SDL_memcmp(guid, &OpenGLES2_GUID, sizeof(GUID)) == 0) { if (SDL_memcmp(guid, &OpenGLES3_GUID, sizeof(GUID)) == 0) {
return OpenGLES2Renderer::Create(DDSDesc.dwWidth, DDSDesc.dwHeight, d3d->GetMSAASamples()); return OpenGLES3Renderer::Create(DDSDesc.dwWidth, DDSDesc.dwHeight, d3d->GetMSAASamples());
} }
#endif #endif
#ifdef USE_OPENGL1 #ifdef USE_OPENGL1
@ -62,8 +62,8 @@ void Direct3DRMRenderer_EnumDevices(const IDirect3DMiniwin* d3d, LPD3DENUMDEVICE
#ifdef USE_SDL_GPU #ifdef USE_SDL_GPU
Direct3DRMSDL3GPU_EnumDevice(cb, ctx); Direct3DRMSDL3GPU_EnumDevice(cb, ctx);
#endif #endif
#ifdef USE_OPENGLES2 #ifdef USE_OPENGLES3
OpenGLES2Renderer_EnumDevice(d3d, cb, ctx); OpenGLES3Renderer_EnumDevice(d3d, cb, ctx);
#endif #endif
#ifdef USE_OPENGL1 #ifdef USE_OPENGL1
OpenGL1Renderer_EnumDevice(cb, ctx); OpenGL1Renderer_EnumDevice(cb, ctx);

View File

@ -4,13 +4,13 @@
#include "d3drmtexture_impl.h" #include "d3drmtexture_impl.h"
#include "ddraw_impl.h" #include "ddraw_impl.h"
#include <GLES2/gl2.h> #include <GLES3/gl3.h>
#include <SDL3/SDL.h> #include <SDL3/SDL.h>
#include <vector> #include <vector>
DEFINE_GUID(OpenGLES2_GUID, 0x682656F3, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04); DEFINE_GUID(OpenGLES3_GUID, 0x682656F3, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04);
struct GLES2TextureCacheEntry { struct GLES3TextureCacheEntry {
IDirect3DRMTexture* texture; IDirect3DRMTexture* texture;
Uint32 version; Uint32 version;
GLuint glTextureId; GLuint glTextureId;
@ -18,7 +18,7 @@ struct GLES2TextureCacheEntry {
uint16_t height; uint16_t height;
}; };
struct GLES2MeshCacheEntry { struct GLES3MeshCacheEntry {
const MeshGroup* meshGroup; const MeshGroup* meshGroup;
int version; int version;
bool flat; bool flat;
@ -30,11 +30,11 @@ struct GLES2MeshCacheEntry {
GLuint ibo; GLuint ibo;
}; };
class OpenGLES2Renderer : public Direct3DRMRenderer { class OpenGLES3Renderer : public Direct3DRMRenderer {
public: public:
static Direct3DRMRenderer* Create(DWORD width, DWORD height, DWORD msaaSamples); static Direct3DRMRenderer* Create(DWORD width, DWORD height, DWORD msaaSamples);
OpenGLES2Renderer(DWORD width, DWORD height, DWORD msaaSamples, SDL_GLContext context, GLuint shaderProgram); OpenGLES3Renderer(DWORD width, DWORD height, DWORD msaaSamples, SDL_GLContext context, GLuint shaderProgram);
~OpenGLES2Renderer() override; ~OpenGLES3Renderer() override;
void PushLights(const SceneLight* lightsArray, size_t count) override; void PushLights(const SceneLight* lightsArray, size_t count) override;
void SetProjection(const D3DRMMATRIX4D& projection, D3DVALUE front, D3DVALUE back) override; void SetProjection(const D3DRMMATRIX4D& projection, D3DVALUE front, D3DVALUE back) override;
@ -64,9 +64,9 @@ class OpenGLES2Renderer : public Direct3DRMRenderer {
void AddMeshDestroyCallback(Uint32 id, IDirect3DRMMesh* mesh); void AddMeshDestroyCallback(Uint32 id, IDirect3DRMMesh* mesh);
MeshGroup m_uiMesh; MeshGroup m_uiMesh;
GLES2MeshCacheEntry m_uiMeshCache; GLES3MeshCacheEntry m_uiMeshCache;
std::vector<GLES2TextureCacheEntry> m_textures; std::vector<GLES3TextureCacheEntry> m_textures;
std::vector<GLES2MeshCacheEntry> m_meshs; std::vector<GLES3MeshCacheEntry> m_meshs;
D3DRMMATRIX4D m_projection; D3DRMMATRIX4D m_projection;
SDL_Surface* m_renderedImage = nullptr; SDL_Surface* m_renderedImage = nullptr;
bool m_dirty = false; bool m_dirty = false;
@ -97,9 +97,9 @@ class OpenGLES2Renderer : public Direct3DRMRenderer {
ViewportTransform m_viewportTransform; ViewportTransform m_viewportTransform;
}; };
inline static void OpenGLES2Renderer_EnumDevice(const IDirect3DMiniwin* d3d, LPD3DENUMDEVICESCALLBACK cb, void* ctx) inline static void OpenGLES3Renderer_EnumDevice(const IDirect3DMiniwin* d3d, LPD3DENUMDEVICESCALLBACK cb, void* ctx)
{ {
Direct3DRMRenderer* device = OpenGLES2Renderer::Create(640, 480, d3d->GetMSAASamples()); Direct3DRMRenderer* device = OpenGLES3Renderer::Create(640, 480, d3d->GetMSAASamples());
if (!device) { if (!device) {
return; return;
} }
@ -127,5 +127,5 @@ inline static void OpenGLES2Renderer_EnumDevice(const IDirect3DMiniwin* d3d, LPD
D3DDEVICEDESC helDesc = {}; D3DDEVICEDESC helDesc = {};
EnumDevice(cb, ctx, "OpenGL ES 2.0 HAL", &halDesc, &helDesc, OpenGLES2_GUID); EnumDevice(cb, ctx, "OpenGL ES 2.0 HAL", &halDesc, &helDesc, OpenGLES3_GUID);
} }