Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi 3 fixes #87

Open
wants to merge 1 commit into
base: GLES31_PORT
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ else()

elseif(UNIX)
if ((${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64" AND CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv" AND CMAKE_SYSTEM_NAME STREQUAL "Linux"))
option(DAEDALUS_GLES "OpenGLES 3.1 Renderer" ON)
option(DAEDALUS_GLES "OpenGLES 2.1 Renderer" ON)
else()
option(DAEDALUS_GL "OpenGL Renderer" ON)
endif()
Expand Down
2 changes: 1 addition & 1 deletion Source/SysGLES/GL.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef SYSGLES_GL_H_
#define SYSGLES_GL_H_

#include <GLES3/gl3.h>
#include <GLES2/gl2.h>
#include <SDL2/SDL_opengl.h>
#include <SDL2/SDL.h>

Expand Down
2 changes: 1 addition & 1 deletion Source/SysGLES/Graphics/GraphicsContextGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ bool GraphicsContextGL::Initialise()

// Create the window
gWindow = SDL_CreateWindow(
"Daedalus - GLES 3.1",
"Daedalus - GLES 2.1",
SDL_WINDOWPOS_CENTERED,
SDL_WINDOWPOS_CENTERED,
SCREEN_WIDTH,
Expand Down
9 changes: 6 additions & 3 deletions Source/SysGLES/HLEGraphics/RendererGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <iostream>
#include <filesystem>

#include <GLES3/gl3.h>
#include <GLES2/gl2.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
#include <SDL2/SDL_syswm.h>
Expand Down Expand Up @@ -112,8 +112,8 @@ bool initgl()
gRDPStateManager.SetEmulateMirror(!gAccurateUVPipe);

// Generate VAO
glGenVertexArrays(1, &gVAO);
glBindVertexArray(gVAO);
//glGenVertexArrays(1, &gVAO);
//glBindVertexArray(gVAO);

// Generate VBOs
glGenBuffers(kNumBuffers, gVBOs);
Expand All @@ -130,6 +130,9 @@ bool initgl()
glBindBuffer(GL_ARRAY_BUFFER, gVBOs[kColorBuffer]);
glBufferData(GL_ARRAY_BUFFER, sizeof(gColorBuffer), gColorBuffer, GL_DYNAMIC_DRAW);

glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(GLfloat), (void*)0);

return true;
}

Expand Down
4 changes: 2 additions & 2 deletions Source/SysGLES/HLEGraphics/n64.psh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ precision highp int;
// 1. Macro trick to avoid redefinition of built-in in ES 3.0
// --------------------------------------------------------
#ifdef GL_ES
#if __VERSION__ < 310
#if __VERSION__ < 210
// Only apply if we really end up at ES 3.0 environment
#define texelFetch myTexelFetch
#endif
Expand Down Expand Up @@ -305,4 +305,4 @@ vec4 fetchSimple(

vec2 uvf = (vec2(uv) - vec2(tile_tl << 3)) * (tex_scale / 32.0);
return texture(tex, uvf);
}
}
Loading