Skip to main content
gamedev.net
🔒 Locked

fast question

Started by falledAngel Apr 20, 2006 at 1:40 AM 2 replies 700+ views
Original Post
falledAngel
falledAngel
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
I spent most of my money on booze, women and cars. The rest I just wasted. George Best
Endar
Endar
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();}
[size="2"][size=2]Mort, Duke of Sto Helit: NON TIMETIS MESSOR -- Don't Fear The Reaper
falledAngel
falledAngel
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?
I spent most of my money on booze, women and cars. The rest I just wasted. George Best
Kambiz
Kambiz
void someObject::GetRGBA(float* RGBA)
{
//...
RGBA[0]=R;
RGBA[1]=G;
RGBA[2]=B;
RGBA[3]=A;
}

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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.