Jump to content
  • Advertisement
Sign in to follow this  
Meshboy

OpenGL Cant declare a GLFloat! Help with Setup.

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can i use this code with OpenGL ES? How much is the diff between ES and normal OpenGL? Why can´t i define a GLfloat in my code without an error? GLfloat vVertices[] = {0.0f, 0.5f, 0.0f, -0.5f, -0.5f, 0.0f, 0.5f, -0.5f, 0.0f}; This won´t work, must i have the normal OpenGL Libraries when i have the ES installed?

Share this post


Link to post
Share on other sites
Advertisement
In the GL ES header file (gl.h) it says

typedef unsigned int GLenum;
typedef unsigned char GLboolean;
typedef unsigned int GLbitfield;
typedef signed char GLbyte;
typedef short GLshort;
typedef int GLint;
typedef int GLsizei;
typedef unsigned char GLubyte;
typedef unsigned short GLushort;
typedef unsigned int GLuint;
typedef float GLfloat;
typedef float GLclampf;
typedef void GLvoid;
typedef int GLintptrARB;
typedef int GLsizeiptrARB;
typedef int GLfixed;
typedef int GLclampx;

so perhaps your gl.h has a problem. Redownload it from khronos.org

Share this post


Link to post
Share on other sites
Ok i will try that. But am i right when i am taking the normal OpenGL Library and OpenGL ES for two different things? All functionality from OpenGL don´t exists i guess?

Share this post


Link to post
Share on other sites
Quote:
Original post by EngineCoder
Floating point is not supported by all OpenGL ES profiles.


According to es_full_spec.1.1.12.pdf, floating point is available.

Share this post


Link to post
Share on other sites
According to es_full_spec.1.1.12.pdf (page 12):
Quote:
This specification described two profiles for OpenGL ES : Common and Common-Lite. While many commands are shared by both profiles, some commands are only supported by one profile.
The Common-Lite profile differs from the Common profile primarily in being targeted at a simpler class of graphics system not supporting high-performance floating-point calculations. The Common-Lite profile supports only commands taking fixed-point arguments, while the Common profile also includes many equivalent commands taking floting-point arguments.


Also see Appendix C. Quote from Section C.2 (page 152):
Quote:
The CL profile does not support any of the commands taking floating-point arguments, such as Normal3f. Alternate versions of those commands taking fixed-point arguments are provided instead.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!