Members in Shoutbox
None.
Shoutbox Search
Shoutbox Commands
/w [name] > Whisper
/r > Reply to last whisper /me > Marks as action Shoutbox Information
Moderators may delete any and all shouts at will.
|
Global Shoutbox
Please log in to shout.
[2015-11-07. : 5:01 am] CecilSunkure -- well, it gives you data at that spot, which is usually just color[2015-11-07. : 5:01 am] CecilSunkure -- you give it a texture sampler + coordinates, it gives you back the color from that spot[2015-11-07. : 4:58 am] Dem0n -- it does something with Tex0 and texcoord and sets it equal to the diffuse txture[2015-11-07. : 4:57 am] O)FaRTy1billion[MM] -- if anything I'd think it should be the textureId or something, because that's how opengl references the texture image[2015-11-07. : 4:55 am] O)FaRTy1billion[MM] -- in the shader it's setting the variable "Tex0" to whatever TexUnit is supposed to be[2015-11-07. : 4:51 am] Dem0n -- Someone told me to do this: int TexUnit = 0; texture_shader.setUniformValue("Tex0", (int)TexUnit); meshList[i]->materials[i].map_Kd->bind(TexUnit);[2015-11-07. : 4:45 am] O)FaRTy1billion[MM] -- because it's not really a name, that's why it's called textureId everywhere else[2015-11-07. : 4:43 am] Dem0n -- If glBindTexture wants a texture name passed in, why is the type supposed to an unsigned int?[2015-11-07. : 4:42 am] O)FaRTy1billion[MM] -- so there is either a problem loading the texture to the texture ID or something we're missing about binding textures with the QTexturewhatever[2015-11-07. : 4:40 am] Dem0n -- Yeah. It works fine if I comment that out, but then crashes as soon as I put it back in[2015-11-07. : 4:39 am] O)FaRTy1billion[MM] -- Dem0nDem0n shouted: Well where is my problem? Why is this shit crashing when I try to get the texture name is it crashing at the bind, or where specifically?[2015-11-07. : 4:39 am] O)FaRTy1billion[MM] -- glBindTexture specifies the texture, the VertexTexCoordwhatever is what maps the texture[2015-11-07. : 4:39 am] Dem0n -- Well where is my problem? Why is this shit crashing when I try to get the texture name[2015-11-07. : 4:39 am] O)FaRTy1billion[MM] -- FaRTy1billionFaRTy1billion shouted: meshList[i]->texCoordBuffer.bind(); phong_shader.setAttributeBuffer( "VertexTexCoord", GL_FLOAT, 0, 3 ); phong_shader.enableAttributeArray( "VertexTexCoord" ); this maps the vertices to the texture[2015-11-07. : 4:38 am] O)FaRTy1billion[MM] -- meshList[i]->texCoordBuffer.bind(); phong_shader.setAttributeBuffer( "VertexTexCoord", GL_FLOAT, 0, 3 ); phong_shader.enableAttributeArray( "VertexTexCoord" );[2015-11-07. : 4:38 am] O)FaRTy1billion[MM] -- It doesn't map the vertices, it just says to use that when drawing. The actual mapping is done by texcoords[2015-11-07. : 4:37 am] Dem0n -- How? The description of glBindTexture says that it just binds the texture name to the target. Where does it actually map the textures to the vertices or whatevfer?[2015-11-07. : 4:36 am] O)FaRTy1billion[MM] -- glBindTexture says "Use this image ID, loaded in video ram, when drawing this triangle"[2015-11-07. : 4:36 am] O)FaRTy1billion[MM] -- Dem0nDem0n shouted: Where does opengl even map the textures onto the mesh? Is it in the glBindTexture thing? yes[2015-11-07. : 4:36 am] O)FaRTy1billion[MM] -- cout << "loading " << texture_file.toStdString() << endl; so you get "loading (whatever) *DONE*" ?[2015-11-07. : 4:36 am] Dem0n -- Where does opengl even map the textures onto the mesh? Is it in the glBindTexture thing?[2015-11-07. : 4:34 am] O)FaRTy1billion[MM] -- is there any other error checking you could do or something?[2015-11-07. : 4:33 am] O)FaRTy1billion[MM] -- I was just thinking if one didn't have a texture, if(mat.is_texture) might help xD[2015-11-07. : 4:32 am] Dem0n -- It crashes after I try loading 1 object, so there's only one in each[2015-11-07. : 4:32 am] O)FaRTy1billion[MM] -- If there is no texture in one/any of them it might be a problem[2015-11-07. : 4:31 am] O)FaRTy1billion[MM] -- in to the mesh/material ... How many meshes are in meshlist, and how many materials?[2015-11-07. : 4:30 am] Dem0n -- Nah releasing doesn't help. I think it crashes as soon as I try to bind it.[2015-11-07. : 4:28 am] O)FaRTy1billion[MM] -- and you already said the textureId one just didn't work? |