Loading a texture in GLM
hey im using GLM(made by nate robins) with SFML and opengl on mingw32 with the IDE as CodeBlocks(windows)
when loading my texture with the GLM from: http://www.3dcodingtutorial.com/Working-with-3D-models/Getting-GLM.html
hey i managed to get rid of the color problem by changing up my code to better load the textures, but now im not able to get the texture to display...
heres the NEW link to my main: http://pastebin.com/gasu1Hux
i have been looking up GLm tutorials but i cant find any correct answers about my texture not displaying at all.....
maybe im missing something?
/////////////////////OLD/////////////////////////////
also i tried the one from devernay.free.fr, but i always get a texture error (not gonna post because everytime i do, my question gets downed...)
i had gotten a small glitch where my whole model is blue instead of the default开发者_如何学编程 gray...
i found out that the GLM library i have doesnt load textures by itself..
so i managed to find a texture loader from 3dcodingtutorial.com
when i load the texture its not put on the model, it just changes its color.
right now im wondering why my model is one single color instead of the texture i setup.
heres some of the code that i used to make the texture and draw the model:
ok heres the main.cpp
sorry wrong paste ._.
the paste has been updated!!
http://pastebin.com/tcwwasb9
The default GL_TEXTURE_ENV_MODE
is GL_MODULATE
. Make sure you aren't inadvertently setting your color state somewhere, or force the issue with glColor3ub(255,255,255)
before you render something with a texture.
EDIT: GL_DECAL
is also an option.
精彩评论