Fix opengl lib
This commit is contained in:
parent
22dea04520
commit
126c76dcaa
4 changed files with 15 additions and 58617 deletions
|
@ -11,23 +11,23 @@ find_package(GLUT REQUIRED)
|
||||||
|
|
||||||
|
|
||||||
# Add gl1 executable build from gl1.cpp, glew.c and Renderer.cpp
|
# Add gl1 executable build from gl1.cpp, glew.c and Renderer.cpp
|
||||||
#add_executable(
|
add_executable(
|
||||||
# gl1
|
gl1
|
||||||
# gl1.cpp
|
gl1.cpp
|
||||||
# Shader.cpp
|
Shader.cpp
|
||||||
# Renderer.cpp
|
Renderer.cpp
|
||||||
# VertexBuffer.cpp
|
VertexBuffer.cpp
|
||||||
# IndexBuffer.cpp
|
IndexBuffer.cpp
|
||||||
# VertexArray.cpp
|
VertexArray.cpp
|
||||||
# utils.cpp
|
VertexBufferLayout.cpp
|
||||||
#)
|
utils.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
#target_link_libraries(gl1 /usr/local/lib/libGLEW.2.2.0.dylib)
|
|
||||||
# Link gl1 with glfw lib
|
# Link gl1 with glfw lib
|
||||||
#target_link_libraries(gl1 glfw)
|
target_link_libraries(gl1 glfw)
|
||||||
# Link gl1 with glew
|
# Link gl1 with glew
|
||||||
#target_link_libraries(gl1 glew)
|
target_link_libraries(gl1 GLEW)
|
||||||
# Link gl1 with OpenGL
|
# Link gl1 with OpenGL
|
||||||
#target_link_libraries(gl1 OpenGL::GL)
|
target_link_libraries(gl1 OpenGL::GL)
|
||||||
#target_link_libraries(gl1 ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} )
|
#target_link_libraries(gl1 ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} )
|
||||||
|
|
|
@ -47,25 +47,4 @@ public:
|
||||||
{
|
{
|
||||||
return m_Stride;
|
return m_Stride;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <> void VertexBufferLayout::Push<float>(unsigned int count)
|
|
||||||
{
|
|
||||||
VertexBufferElement vbe = {GL_FLOAT, count, GL_FALSE};
|
|
||||||
m_Elements.push_back(vbe);
|
|
||||||
m_Stride += count * VertexBufferElement::GetSizeOfType(GL_FLOAT);
|
|
||||||
};
|
|
||||||
|
|
||||||
template <> void VertexBufferLayout::Push<unsigned int>(unsigned int count)
|
|
||||||
{
|
|
||||||
VertexBufferElement vbe = {GL_UNSIGNED_INT, count, GL_FALSE};
|
|
||||||
m_Elements.push_back(vbe);
|
|
||||||
m_Stride += count * VertexBufferElement::GetSizeOfType(GL_UNSIGNED_INT);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <> void VertexBufferLayout::Push<unsigned char>(unsigned int count)
|
|
||||||
{
|
|
||||||
VertexBufferElement vbe = {GL_UNSIGNED_BYTE, count, GL_TRUE};
|
|
||||||
m_Elements.push_back(vbe);
|
|
||||||
m_Stride += count * VertexBufferElement::GetSizeOfType(GL_UNSIGNED_BYTE);
|
|
||||||
}
|
|
32080
src/opengl/glew.c
32080
src/opengl/glew.c
File diff suppressed because it is too large
Load diff
26501
src/opengl/glew.h
26501
src/opengl/glew.h
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue