Skip to content

Commit

Permalink
Fix compilation errors in examples for the Windows build.
Browse files Browse the repository at this point in the history
  • Loading branch information
mackron committed Sep 19, 2020
1 parent ff6a487 commit 62127ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/99_ARB_shaders/99_ARB_shaders.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static GLenum CreateShader(GLBexample* pExample, GLenum shaderTarget, const char
glBindProgramARB(shaderTarget, shaderObject);

/* Load and compile. */
glProgramStringARB(shaderTarget, GL_PROGRAM_FORMAT_ASCII_ARB, shaderStringLength, pShaderString);
glProgramStringARB(shaderTarget, GL_PROGRAM_FORMAT_ASCII_ARB, (GLsizei)shaderStringLength, pShaderString);

/* Check for any errors. */
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &shaderErrorPos);
Expand Down
4 changes: 2 additions & 2 deletions examples/glbExamplesCommon.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct GLBexample
#if defined(GLBIND_WGL)
static LRESULT glbExample_DefaultWindowProcWin32(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
GLBexample* pExample = (GLBexample*)GetWindowLongPtrA(hWnd, GWL_USERDATA);
GLBexample* pExample = (GLBexample*)GetWindowLongPtrA(hWnd, GWLP_USERDATA);
if (pExample != NULL) {
switch (msg)
{
Expand Down Expand Up @@ -95,7 +95,7 @@ static GLenum glbExampleInitWindow(GLBexample* pExample, GLsizei sizeX, GLsizei
return -1;
}

SetWindowLongPtrA(pExample->win32.hWnd, GWL_USERDATA, (LONG_PTR)pExample);
SetWindowLongPtrA(pExample->win32.hWnd, GWLP_USERDATA, (LONG_PTR)pExample);

SetPixelFormat(GetDC(pExample->win32.hWnd), glbGetPixelFormat(), glbGetPFD());
}
Expand Down

0 comments on commit 62127ac

Please sign in to comment.