• 9
• 10
• 9
• 10
• 10
• ### Similar Content

• Good evening everyone!

I was wondering if there is something equivalent of  GL_NV_blend_equation_advanced for AMD?
Basically I'm trying to find more compatible version of it.

Thank you!

• Hello guys,

How do I know? Why does wavefront not show for me?
I already checked I have non errors yet.

And my download (mega.nz) should it is original but I tried no success...
- Add blend source and png file here I have tried tried,.....

PS: Why is our community not active? I wait very longer. Stop to lie me!
Thanks !

• I wasn't sure if this would be the right place for a topic like this so sorry if it isn't.
I'm currently working on a project for Uni using FreeGLUT to make a simple solar system simulation. I've got to the point where I've implemented all the planets and have used a Scene Graph to link them all together. The issue I'm having with now though is basically the planets and moons orbit correctly at their own orbit speeds.
I'm not really experienced with using matrices for stuff like this so It's likely why I can't figure out how exactly to get it working. This is where I'm applying the transformation matrices, as well as pushing and popping them. This is within the Render function that every planet including the sun and moons will have and run.
if (tag != "Sun") { glRotatef(orbitAngle, orbitRotation.X, orbitRotation.Y, orbitRotation.Z); } glPushMatrix(); glTranslatef(position.X, position.Y, position.Z); glRotatef(rotationAngle, rotation.X, rotation.Y, rotation.Z); glScalef(scale.X, scale.Y, scale.Z); glDrawElements(GL_TRIANGLES, mesh->indiceCount, GL_UNSIGNED_SHORT, mesh->indices); if (tag != "Sun") { glPopMatrix(); } The "If(tag != "Sun")" parts are my attempts are getting the planets to orbit correctly though it likely isn't the way I'm meant to be doing it. So I was wondering if someone would be able to help me? As I really don't have an idea on what I would do to get it working. Using the if statement is truthfully the closest I've got to it working but there are still weird effects like the planets orbiting faster then they should depending on the number of planets actually be updated/rendered.

• Hello everyone,
I have problem with texture

• Hello everyone
For @80bserver8 nice job - I have found Google search. How did you port from Javascript WebGL to C# OpenTK.?
I have been searched Google but it shows f***ing Unity 3D. I really want know how do I understand I want start with OpenTK But I want know where is porting of Javascript and C#?

Thanks!

# OpenGL One channel textures not working for ES 2.0?

This topic is 660 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Okay, I've been trying to figure out what is wrong with this code to create a 1024x1024x8 texture with OpenGL ES.  I'm trying to get this working with an iPad2, and it keeps giving me GL_INVALID_OPERATION.  Not sure why as GL_EXT_texture_rg claims to be supported by my device.  I use the same code with core OpenGL 3+ and it works just fine.  I haven't tried ES 3.0 directly because I want this to work on ES 2.0 devices too.

glTexImage2D( GL_TEXTURE_2D, 0, GL_R8_EXT, 1024, 1024, 0, GL_RED_EXT, GL_UNSIGNED_BYTE, pixels );


So I can't seem to figure out why this isn't working.  Any ideas?  Thanks.

Shogun.

EDIT: Thanks to slicer4ever, I got it working (minus a slight bit of texture corruption) using GL_LUMINANCE instead.  If I may ask in addition, what's the big difference between the two since they are both 8-bit texture formats?

Edited by blueshogun96

##### Share on other sites

GL_LUMINANCE stores a single value, but when sampled in a shader, it fetches vec4(value, value, value, 1.0). I'm not sure what happens when you try to render to one of these textures (via a FBO).

From the texture_rg extension it seems to be an attempt to modernize the API:

Historically one- and two-component textures have been specified in OpenGL
ES using the luminance or luminance-alpha (L/LA) formats. With the advent
of programmable shaders and render-to-texture capabilities these legacy
formats carry some historical artifacts which are no longer useful.

For example, when sampling from such textures, the luminance values are
replicated across the color components. This is no longer necessary with

It is also desirable to be able to render to one- and two-component format
textures using capabilities such as framebuffer objects (FBO), but
rendering to L/LA formats is under-specified (specifically how to map
R/G/B/A values to L/A texture channels).

This extension adds new base internal formats for one-component RED and
two-component RG (red green) textures as well as sized RED and RG internal
formats for renderbuffers. The RED and RG texture formats can be used for
both texturing and rendering into with framebuffer objects

Edited by Hodgman

##### Share on other sites

Okay, now I get it.  I personally don't see the need for two different formats, but I'm not on the ARB, so it doesn't matter what I think.

Bottom line is that it works, so I'm satisfied.

Thanks,

Shogun

##### Share on other sites

According to the specification the value you are specifying for the format internal format GL_R8_EXT is for the renderbuffers. Also be aware that for OpenGLES 2.0 at least, from the spec:

GL_INVALID_OPERATION is generated if format does  not match internalformat.