Hey, I'm trying to draw a constant color to the framebuffer and blend it using the alpha channel from an RGBA texture. I've been looking at glBlendFunc and glBlendColor, but can't seem to figure out a way to ignore the RGB values from the texture. I'm thinking I'll have to pull out the alpha values myself and make a second texture with G...
Hi All,
I mainly program plugins using wxWidgets within a Carbon bundle which is
loaded at runtime. The host-applications where my plugins are running in
provide a native window handle (WindowRef), which I can use to add my custom,
wxWidgets-based GUI-classes.
To use the native window handle with wxWidgets
classes I had to write a wxTo...
HI I am starting to learn openGl for C++.but at stating point I stucked.
I have 2 question that is the coordinates for drawing some objects? I mean where is X, Y and Z?
Second one I am making tutorial from some sites. and I am trying to animate my triangle.In tutorial it works but on my computer not.I Also downloaded source codes b...
Is it possible to disable texture colors, and use only white as the color? It would still read the texture, so i cant use glDisable(GL_TEXTURE_2D) because i want to render the alpha channels too.
All i can think of now is to make new texture where all color data is white, remaining alpha as it is.
I need to do this without shaders, so ...
Hi All,
I am having trouble cube mapping when using a DDS cube map, I'm just getting a black cube which leads me to believe I have missing something simple, here's the code so far:
DDS_IMAGE_DATA *pDDSImageData = LoadDDSFile(filename);
//compressedTexture = -1;
if(pDDSImageData != NULL)
{
int height = pDDSImageData->height;
i...
I'm just using the opengl SDL template with Xcode, and everything runs fine. I removed the Atlantis code, and changed the main extension to .mm, then added some testing code to drawGL. Drawing a simple triangle (using immediate mode) at this point inside drawGL gives me a white triangle, but when I add the code to draw using a vertex buf...
What is the simplest algorithm for decomposing a quadrilateral into an arbitrary number of triangles?
...
I have this code:
def setup_framebuffer(surface):
#Create texture if not done already
if surface.texture is None:
create_texture(surface)
#Render child to parent
if surface.frame_buffer is None:
surface.frame_buffer = glGenFramebuffersEXT(1)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, surface.frame_buffer)
glFramebufferTexture2DEX...
I know this thing works:
void myDisplay()
{
...
}
int main()
{
...
glutDisplayFunc(myDisplay)
...
}
so I tried to include myDisplay() function to a class that I made. Because I want to overload it in the future with a different class. However, the compiler complains that
argument of type 'void (ClassBlah::)()' does not match 'void(*...
When on MacOSX, "man glRotate" brings up the glRotate manpage.
On ubuntu, with manpages-dev and manpages-posix-dev insatlled, "man glRotate" doesn't bring up the glRotate manpage (though I can build and compile gl apps).
What am I missing? How do I setup this up?
Thanks
...
I'd like to display some 3d object on top of the normal 2d ui layout screen.
The 2d ui screen has background image, and GLSurfaceView is child of the content layout.
I tried the same technique of the Translucent GLSurfaceView in ApiDemos sample,
but GLSurfaceView clears all and shows black background.
<?xml version="1.0" encoding="...
Hi,
I'm having problems compiling a CUDA program that uses GLUT on MacOsX. Here is the command line I use to compile the source:
nvcc main.c -o main -Xlinker "-L/System/Library/Frameworks/OpenGL.framework/Libraries -lGL -lGLU" "-L/System/Library/Frameworks/GLUT.framework"
And here is the errors I get:
Undefined symbols:
"_glutInitW...
This question repeats my earlier one but my earlier one was a failure because I didn't copy some vital information correctly, so I have to redo it.
I'm getting an error with a call to an OpenGL function. Maybe pyglet isn't initialising OpenGL correctly? The error happens with a simple function that worked before:
def setup_framebuffer...
Hi,
i have uptill now worked on linux where its very easy to install opensource libraries using simple configure;make;make install commands..
now i need to use MSVC++ to run some opengl code that includes the standard opengl headers..
but defaultly they arent present..
i downloaded the tar file from freeglut site,it has VisualStudio20...
I need to debug a GLSL program but I don't know how to output intermediate result.
Is it possible to make some debug traces (like with printf) with GLSL ?
...
Hey guys,
Say I use glRotate to translate the current view based on some arbitrary user input (i.e, if key left is pressed then rtri+=2.5f)
glRotatef(rtri,0.0f,1.0f,0.0f);
Then I draw the triangle in the rotated position:
glBegin(GL_TRIANGLES); // Drawing Using Triangles
glVertex3f( 0.0f, 1.0f, 0.0f); // Top
glVertex3f(-1....
Hi All,
I am trying to get update the eye position in my shader from my appliaction but I keep getting error 1281 when I attempt this. I have no problems after the initialization just when i subsequently try to update the values. Here is my code:
void GraphicsObject::SendShadersDDS(char vertFile [], char fragFile [],
...
Hey,
I have a simple OpenGL drawing. When the user changes the window's size, I want the drawing to maintain it's aspect ration. I accomplished that by setting the glViewport to the maximum rectangle with the appropriate aspect ration whenever the reshape method is called.
My problem is that I want to draw a square that will always rem...
I'm not entirely sure if I can do what I want here, but I have a bunch of objects being rendered in OpenGL (using JOGL). For one group of objects, I want to ensure that certain objects in that group are rendered in front of other objects in that group. I've tried clearing the depth buffer bit and rendering the "front" objects last, and t...
Hello,
I'm trying to implement a simple program using 3 FBO's to render a scene to a texture and display a textured quad. I've successfully done this previously using fragment shaders before projecting to the textured quad but can't get it to work without a shader. What could be wrong?
First I set up my textures
glGenTextures(3, renderT...