Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 29 Apr 2002
Offline Last Active Yesterday, 02:34 AM

Posts I've Made

In Topic: Weird result using when using texture atlas with Freetype2

25 October 2016 - 07:34 PM

Ive had a problem similar to this with gl text before, although it was a while ago and I dont remember what it was exactly. What gl version are you targeting and what does the shader look like for this?

Have you rendered the atlas to a quad and confirmed that everything is copying into the right place? Off the top of my head I remember something about setting the textures swizzle tex parameter GL_TEXTURE_SWIZZLE_RGBA to {GL_RED, GL_RED, GL_RED, GL_RED} when using the format GL_RED but thats just a guess.


1) confirm your tex coords are generated correctly

2) confirm the image displays as you think it should

3) confirm you are getting the correct values in the shader when sampling the texture in the fragment shader

In Topic: Why do new engines change their file extensions and formats all the time?

27 September 2016 - 06:19 PM

Probably to add features existing formats dont have, compression, mipmaps precalculated, HDR, could be a million things other formats dont support or dont do well enought for them.

In Topic: correct modeling for game developement (poly count)

21 September 2016 - 12:32 AM

Thats pretty much correct, the baking youre referring to is common to generate a normal map (and other maps, AO, etc). The general idea is you have a low poly and a high poly that essentially match/lineup except they have different poly counts, and therefore the higher poly one is more detailed. You "bake" these high poly details into a texture (like a normal map) and then apply the normal map to the low poly in game for lighting calcs, etc.


Youre missing steps in the sense that it can be a little more involved, depends on the tools/process used, normal map output depends on the target engine/software format, conventions, etc. and as I understand it, its not exactly hard to generate bad maps containing errors if the input models are not what/where they need to be.


a program called x-normal is often used for the "bake" process.


As for poly counts, again its sort of target dependent, what are they for, I believe the characters in doom 3 if I remember were somewhere between 1500-3000, thats probably on

the lower end these days, but again its depends on the target use and the effects that will be applied to it, it really could be anything. Two triangles for a wall in the world with a lot

of effects on it might do the job. For the high poly bake source, ive seen extremely high counts, 100s of thousands or more depending. But again it depends on whats needed.

In Topic: GLSL: Incorrect WorldPosition

30 August 2016 - 06:44 PM

Im not sure what "matTotal" is or how youre building it, is "matTotal" the combined world * view * proj matrix? if it is you might be transforming object space verts (vertexPos) into world (WorldPos) and then transforming world space pos "WorldPos" by world again, as part of the world view proj matrix "matTotal".

"matTotal" is an odd name, might wanna name it what it is, MVP or VP.

In Topic: My Properly-Created OpenGL Context Is Lying To Me.

25 August 2016 - 12:30 AM

Why disable the context on line 5, only to turn it on again on 7? and why get two pointers to CreateContextAttribs? seems odd, or are these sanity checks?


Generally you




load CreateContextAttribs  // get ptr

call CreateContextAttribs   // get the new context

MakeCurrent(null)             // done with old

DeleteContext(old)           // delete old


// off you go