I'm new at OpenGL and I can't find out how to do this:
I want to render a letter and be able to change it's color, so I have a texture with the letter on a transparent background. I managed to render it using this code:
glEnable(GL_BLEND)
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
But that renders the letter in black, as it's...
I've been writing a small desktop gadget-type application that displays scrolling text along the bottom of the screen (Similar to the old CNN news ticker), however the performance of GDI is just unsatisfactory (As high as 8-12% on a quad core and 20% on a single core) even after I've attempted to clean out bottlenecks.
I was considering...
I have the data of an image loaded into memory as a one dimensional array. Since I'm trying to use OpenGL to draw it, and since it reads from the bottom up, I want to try and flip the elements of the array before they're sent to OpenGL. Maybe there's a way to tell OpenGL to read from the top to the bottom? Anyways, I tried using a few me...
I have a list a vertices and a list of triangles. I'd like to split this single mesh into, say 5, randomly shaped meshes. When the 5 randomly shaped meshes are in place the sphere should all line up and look like 1 solid mesh.
I need a algorithm to do this programmatically, not a tool to do it form me. Any pointers would be great!
...
glBindTexture(GL_TEXTURE_2D, texidx);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 512, 512, 0, GL_RGBA, GL_FLOAT, texdata);
If texidx == 0 everything works perfectly, but if texidx != 0, or is generated using glGenTexture(&texidx,1), the eventual rendering shows just solid color (last glColor) instead of the texture. I've been debugging fo...
Right now I'm drawing a cube with OpenGL, I'm using Windows and WGL context. I have blending enabled so my cube looks semi transparent. Basically the background == the clear color (Black). I'd like to be able to save the image in raw RGBA format which I can then make into a png. I basically want the cube to blend in with a NULL backgroun...
Is it possible to not clear entire screen when using glClear() function? I need to clear only a part of the screen to save some rendering time, otherwise i would have to redraw half of the screen every frame, even if nothing is happening on the other half.
Of course this should be done as quickly (or quickier) as the glClear() is now.
...
Hi, I am making a group work in openGL, and when i try to open the file that my partner gave me i have this error:
-------------- Build: Debug in CG ---------------
Linking console executable: bin/Debug/CG
ld: library not found for -lGL
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors...
I'll try to keep this simple.
I want a way to access the normal information of the scene, from the Frame Buffer output (or similar). The same way one is able to access the Depth Buffer using glGetTexImage and GL_DEPTH_COMPONENT.
I know I could set up a fragment shader which outputs the normal information in RGB color space, which could...
Is it possible to create a display list for Tesselated objects? If so would it be more efficient?
Thanks
...
I'm tinkering with an open source project that uses OpenGL for rendering in 3D. In the construction of the materials I see code like this:
// set ambient material reflectance
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, mAmbient);
In other examples, this is used:
glMaterialfv(GL_FRONT, GL_AMBIENT, mAmbient);
So my question is, what...
Hey, I have a texture loaded with glTextImage2D.
I want to get the texture's size after it was loaded to the VRAM, what do I need to do?
My internal format is RGBA and the texture's format varies.
...
I'm rendering 2D polygons with the GLUTesselator the first time, then they are stored in a display list for subsequent use. I think VBO's might be faster, but since I can't access the stuff that the tesselator outputs, and since it uses mixes of gl_triangle, quad, strip etc, i'm not sure how I could do this, even though I would like to u...
I'm using windows and I notice that a lot of functions are grayed out because I guess #ifdef GL_GLEXT_PROTOTYPES is not defined. One of these is the VBO extension. Should I just define GL_GLEXT_PROTOTYPES? Otherwise how else can I use VBOs since im using OpenGL32.dll (I want my application to have no dll dependencies not included in Wind...
I was wondering, since things like display lists are now deprecated, I'm thinking the GLU polygon tesselator is probably also deprecated. What is the new and correct way of creating concave or complex polygons and complying with the new GL 3 standard? Thanks.
...
I'm using GLUT (freeglut3) (via the Haskell GLUT bindings).
import Graphics.UI.GLUT
handleKBMouse :: KeyboardMouseCallback
handleKBMouse key keyState mods mousePos = do
print (key, keyState, mods, mousePos)
main :: IO ()
main = do
getArgsAndInitialize
createWindow "testTitle"
keyboardMouseCallback $= Just handleKBMous...
Hello Everyone, I am building a dll, which cannot have any dependencies, so I have to compile all the Mesa source code along with it. Now I got the basic opengl drawing working, but I cannot get shaders to work with OSMesa(Offscreen rendering). All the shader examples that come with the sample projects in Mesa have GLEW.h included. But O...
I'm using pyglet for my OpenGL based game but is it the fastest library out there which has a python wrapper? I could create a C++ extension and use any C++ multimedia library. Are there any C++ libraries that are worth investing time into or is it not worth the extra work?
Thank you.
...
Hell every body , i am newbie in linux programming ( Not Windows ) .
i want to know how i can using OpenGL on Linux Platform Without X-Window System , can i send OpenGL Graphics Directly to Framebuffer Device ?!
There Is Project Named DirectFB ( Direct FrameBuffer ) . with DirectFB We can do this but DirectFB needs for driver for each ...