• Advertisement
Sign in to follow this  

fast question

This topic is 4324 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

Hi there! Anybody's Know how to return a GLenum?? I'm creating a class to Create and move Bitmaps on the screen, and I'm Interested in how to create a GLenum to return in on a function. There's any way to free the space on memory where a picture is allocated??? It's for the destructor. Maybe delete array_Name_Texture??? Sorry for my bad writting

Share this post


Link to post
Share on other sites
Advertisement
A GLenum variable is just something like GL_TEXTURE_2D or GL_MODELVIEW_MATRIX.

So, I would imagine that something like this would suffice:

GLenum function()
{
// blah blah blah
// more code

return GL_MODELVIEW_MATRIX;
}

void function2()
{
GLenum v;

v = function();

}

Share this post


Link to post
Share on other sites
thanks to answer me.

well I answer this because If I wanna return the RGBA of a object, it's just to find the best way.

GLenum someObject::getRGBA() {
return "what???"; xD
}

float RGBA[4];
RGBA = object1.getRGBA();


any suggestion?

Share this post


Link to post
Share on other sites
void someObject::GetRGBA(float* RGBA)
{
//...
RGBA[0]=R;
RGBA[1]=G;
RGBA[2]=B;
RGBA[3]=A;
}

float RGBA[4];
object1.getRGBA(RGBA);

Share this post


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

  • Advertisement