daily update on 20240305 by nitload youmu
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
GladGLContext* currentContext;
|
||||
extern char infolog[512] = { 0 };
|
||||
|
||||
SSCAPI void _cdecl initGL(int majorVersion, int minorVersion)
|
||||
SSCAPI void SSCDECL initGL(int majorVersion, int minorVersion)
|
||||
{
|
||||
glfwInit();
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, majorVersion);
|
||||
@@ -15,10 +15,16 @@ SSCAPI void _cdecl initGL(int majorVersion, int minorVersion)
|
||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
}
|
||||
|
||||
SSCAPI unsigned int loadShaderCode(GladGLContext* context, char* const shaderCode, GLint shadertype)
|
||||
SSCAPI unsigned int SSCDECL loadShaderCode(GladGLContext* context, char* const shaderCode, GLint shadertype)
|
||||
{
|
||||
unsigned int shader = context->CreateShader(shadertype);
|
||||
context->ShaderSource(shader, 1, &shaderCode, NULL);
|
||||
unsigned int shader = context->CreateShader(GL_VERTEX_SHADER);
|
||||
if (!shader)
|
||||
{
|
||||
return 0xffffffff;
|
||||
}
|
||||
printf("%s\n", shaderCode);
|
||||
context->ShaderSource(shader, 1, shaderCode, NULL);
|
||||
printf("%s\n", shaderCode);
|
||||
context->CompileShader(shader);
|
||||
int success;
|
||||
context->GetShaderiv(shader, GL_COMPILE_STATUS, &success);
|
||||
|
||||
Reference in New Issue
Block a user