Makin' Mah Mmo


Well yes, so I've been targeting OGLES1.1, since I didn't want to write shaders for everything. But I would still like shaders, particularly pixel shaders, on top of the fixed functionality. And from my research that won't work, although I'd absolutely love if someone would come in here and go "Eni you're wrong".

But from what I gathered doing some Googling around, either you do 100% shaders, or 0% shaders, and currently I'm coding for a model that uses about 10% shaders, which apparently will work on OGL, but not ES.

If it's possible though, again, I'd love to stand corrected.
 
Last edited by a moderator:
Well, you'll need OGLES2 then.
The good news is that fixed function shaders aren't too hard, I think there's actually a function like

"fixedfunctionfragment"

that you call from the shader program.

But you will need to either completely use shaders or not use any.
 
Last edited by a moderator:
'Eniko' said:
Well yes, so I've been targeting OGLES1.1, since I didn't want to write shaders for everything. But I would still like shaders, particularly pixel shaders, on top of the fixed functionality. And from my research that won't work, although I'd absolutely love if someone would come in here and go "Eni you're wrong".

But from what I gathered doing some Googling around, either you do 100% shaders, or 0% shaders, and currently I'm coding for a model that uses about 10% shaders, which apparently will work on OGL, but not ES.

If it's possible though, again, I'd love to stand corrected.



Eni you're 100% correct. I thought the same, but once I wrote out my own camera class, all I have to do is pass that camera class to the shader at a mat4, then use that instead of ftransform(), and I'm sorted!
 
Last edited by a moderator:
'Butterman' said:
Eni you're 100% correct. I thought the same, but once I wrote out my own camera class, all I have to do is pass that camera class to the shader at a mat4, then use that instead of ftransform(), and I'm sorted!

That's all greek to me unfortunately. >_>
 
Last edited by a moderator:
Well, for 2D, I don't think you're going to have to change very much. Just don't use glTranslate or glRotatef, instead pass final co-ordinates for the sprite. If you want to rotate stuff, you just need to make and apply a rotation matrix to its vertices.

The hardest part will proabably be the projection matrix, but I'm pretty sure that's really easy in 2D.

That said, I know a lot of OpenGL stuff is emulated in the SGX driver, with stuff like:

CODE

esTranslate()



So it may just be a case of re-writing a few function names.
 
Last edited by a moderator:
'lulzfish' said:
Well, you'll need OGLES2 then.
The good news is that fixed function shaders aren't too hard, I think there's actually a function like

"fixedfunctionfragment"

that you call from the shader program.

But you will need to either completely use shaders or not use any.
nope, there is no GLSL function which does a fixed function fragment. you'll have to code it yourself.

also, lulzfish, that idea with the single uniform per character is particularly bad - that would mean every character quad would be a separate draw call (uniforms can be changed only actoss draw calls). so you will end up with tons of draw calls for a paragraph of text - way to kill your gpu pipeline.
 
Last edited by a moderator:
Back
Top