Caanoo / WIZ Caanoo/wiz Gl_Blend And Gl_Fog Problems


Pickle

Mega GP Mania
Joined
May 30, 2006
Messages
5,518
Location
Detroit, Michigan
Website
Visit site
Anyone had any experience with these features on the caanoo/wiz opengl-es implementation?

First with fog what i did was enable it as linear, 0.25 density. I then draw a quad that extends the left/right/back of the viewport so simulate ground. The fog should cover up the far edge, but with gph version of this the edges can be seen.

With blend im using

Code:
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

I am attempting to blend a mesh with color material over the color buffer, again this works every where else. But with the gph version the mesh is totally opaque. I did find a table in the magiceyes opengl differences pdf, but im not really sure under what case this falls under. I thought my use would be pretty common.
 
there is no gl_fog on caanoo gles... gl_blend works tiny checkout quake

note that you unlock alpha before blend.

glDisable(GL_ALPHA_TEST);
glEnable (GL_BLEND);

glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); or use glColor4f (1, 1, 1, alpha);

glEnable(GL_ALPHA_TEST);
glDisable (GL_BLEND);
 
Rikku2000 said:
<br />there is no gl_fog on caanoo gles... gl_blend works tiny checkout quake<br /><br />note that you unlock alpha before blend.<br /><br />glDisable(GL_ALPHA_TEST);<br />glEnable (GL_BLEND);<br /><br />glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); or use glColor4f (1, 1, 1, alpha);<br /><br />glEnable(GL_ALPHA_TEST);<br />glDisable (GL_BLEND);<br />
<br /><br /><br />

huh? gl_fog is definitely supported. But you have me thinking that maybe GL_LINEAR is not and maybe only one of the EXP modes are.

and sorry your blend example is pretty much what i have as im not using alpha testing.
 
Last edited by a moderator:
fog is supported, thats for sure. and also linear one, cause i'm using it in audiorace where it works fine.

so you might hit a bug or something unsupported here.

*edit*
just to note, i'm not using it with blending combined
 
crow_riot said:
fog is supported, thats for sure. and also linear one, cause i'm using it in audiorace where it works fine.

so you might hit a bug or something unsupported here.

*edit*
just to note, i'm not using it with blending combined

Did you have any problems with depth and the fog? Cause the fog is defiantly being drawn over the deeper parts of the primitive, but doesnt fully disappear into it.

The blend issue is totally separate from the fog issue.
 
Last edited by a moderator:
maybe you set the fog on the wrong place in your code so its over the model and hide it and aso maybe your fog deep is to near...
 
Rikku2000 said:
maybe you set the fog on the wrong place in your code so its over the model and hide it and aso maybe your fog deep is to near...

color 0.5;0.5;0.5;1.0;
density 0.25f;
start 30.0;
stop 90.0;

the quad is is 100x100 and is positioned at 20;-20;-40

So the quad should be at least 50 units past the fog end point.
 
Last edited by a moderator:
Pickle said:
crow_riot said:
fog is supported, thats for sure. and also linear one, cause i'm using it in audiorace where it works fine.

so you might hit a bug or something unsupported here.

*edit*
just to note, i'm not using it with blending combined

Did you have any problems with depth and the fog? Cause the fog is defiantly being drawn over the deeper parts of the primitive, but doesnt fully disappear into it.

The blend issue is totally separate from the fog issue.

hm no didnt have any problems, but that probably was just from the nature of how i used it.

so maybe ... from what i've read, on some low-end hardware fog is vertex based and not pixel based like on desktop machines. maybe this could be a problem? if you have one big quad with 100x100 this could just be it. probably try subdiv'ing your quad?
 
Last edited by a moderator:
change 30 to 512 and 90 to 1024

color 0.5;0.5;0.5;1.0; to color 0.5;0.5;0.5;0.7;
 
Rikku2000 said:
change 30 to 512 and 90 to 1024

color 0.5;0.5;0.5;1.0; to color 0.5;0.5;0.5;0.7;

can you explain why you suggest those changes, cause i really dont see what your getting at.
512 is going to put the fog way past any geometry. I also dont see the point of having alpha in the fog color.
 
Last edited by a moderator:
Hope becouse 30 to 90 is to near its meaning you watching on a wall with maybe 30cm, 512 begin at 50cm from player and go to 1m far after that nothing visibil

maybe take a look at: http://www.quake-1.com/docs/quakesrc.org/91.html
 
Rikku2000 said:
Hope becouse 30 to 90 is to near its meaning you watching on a wall with maybe 30cm, 512 begin at 50cm from player and go to 1m far after that nothing visibil

This is wrong, opengl translation distances are unitless. Its all relative to the size of the objects and the projection. Which in my case the projection is 1 to 250, which also makes your suggestion to use 512 and 1024 meaningless.
 
Last edited by a moderator:
did you try the ´subdivide´ your quad into more triangles like crow_riot mentioned?
It does seem to me it could be it.
 
erico said:
did you try the ´subdivide´ your quad into more triangles like crow_riot mentioned?
It does seem to me it could be it.

thanks, just wanted to ask by myself. i think it got lost attention ;)
 
Last edited by a moderator:
crow_riot said:
erico said:
did you try the ´subdivide´ your quad into more triangles like crow_riot mentioned?
It does seem to me it could be it.

thanks, just wanted to ask by myself. i think it got lost attention ;)

I have not had a chance to try this, but this is a very good idea.
 
Last edited by a moderator:
Back
Top