I am working on a project to display and animate a tree growing. I am using C++ and OpenGL on this project. The tree grows to a certain number of branches, stops, and then the tree's leaves fall to the ground. I have decided to use Lidenmayer systems to graphically depict this because it seemed an easier alternative to creating a structu...
With normal activities (and I define normal as activities as not using a GLSurfaceView for their drawing), when a new activity loads the old activity remains on screen while the loading occurs. However, when I load an activity that uses GLSurfaceView, the screen goes black while loading occurs.
Loading is less than three seconds, so ...
Hello,
We are new to OpenGL and GLUT programming and our teacher gave us a homework. The task is, there are 3 rectangles and 1 triangle. Each object have a different color (for easy selection) With these objects, we are suppose to do a home building.
I drew the objects but I have big problems with moving.
The first method and the easies...
Hey guys I was starting to study OpenGL, and i wanted to know how to draw a spiral.
I wrote this code:
void RenderScene(void)
{
glClear(GL_COLOR_BUFFER_BIT);
GLfloat x,y,z = -50,angle;
glBegin(GL_POINTS);
for(angle = 0; angle < 360; angle += 1)
{
x = 50 * cos(angle);
y = 50 * sin(angle);
...
How can I actually declare gluPerspective?
I mean I am drawing a spiral and I am setting z = -50 in the beginning and looping until the circle is complete. So what will be the declaration of gluPerspective?
...
Hey,
i was reading opengl superbible, they were telling i can use the arrow keys to rotate the output and get a 3d view of the whole image
but i dont seem to get it........
Any new functions needed to be invoked?
Thanks in advance
...
Hello,
when I am programming with "gtkmm", there is a widget "Gtk::DrawingArea".
I can program that widget "by hand" (so write the code) or more elegant way is to use "glade" user interface designer, where I can do the same "graphically".
Now I am trying to connect OpenGL with gtkmm through "gtkglextmm" library. In that library, there i...
my background.jpg has 52 32x32 mini poker cards.png and when user touch on 1 card, it will enlarge to 120x 170 px.
At any point in time, there is only 1 card being chosen (i.e, being animated) with at most 19 entire cards overlapped (120x170 / 32x32).
Should i use Core Animation or do i have to learn OpenGL or use a library such as coc...
Can anyone tell me how to start learning OpenGL? I have small knowledge of C++. Can I write OpenGL programs in C++? If yes, what are the required things to do? Please tell the steps to follow, as if you are saying to a kid. I'm very new to this concept :(
...
Hi,
I am trying to develop an application where the UI part is designed by WPF and the engine is developed using C++.
I am trying to render a scene using DirectX in native code by getting the window's handle from WPF using WindowsFormsHost method.
Though i do not get any error, no image renders on the screen.
As far as the handle is c...
Hey guys,
I was hoping to study opengl and infact i started studying from superbible. But their examples are too vague and they use functions without explaining some terms and functions and it is pretty hard to figure out.............
Ne suggestions?
...
I am trying to do some work with HopenGL and I need a Ptr that points to a array of floats. From what I have read uarray and storableArray seem to be the way to go, in some combination some way.
...
I'm planning on writing a simple application in Java which has a basic UI with a section of OpenGL graphics. In addition to this some kind of network access is required.
Which one of these libraries should I use? What are the drawbacks and benefits of each option? I'd like the OpenGL coding be as genuine as possible, so that I could fee...
I have an OpenGL-based app that can run windowed or fullscreen in OS X 10.5. While in windowed mode, pressing the volume keys in the keyboard changes the volume setting (mute/unmute for example) and the OSX-drawn speaker icon overlay is drawn, as it happens with every other application.
However, in full screen mode, pressing the keys d...
This is a very vague problem, so please feel free to clarify anything about this project.
I'm working on a very large application, and recently a very perplexing bug has cropped up regarding the texturing. Some of the textures that we are loading are being loaded - I've stepped through the code, and it runs - but all OpenGL renders for ...
I draw buildings in my game world, i shade them with the following code:
GLfloat light_ambient[] = {0.0f, 0.0f, 0.0f, 1.0f};
GLfloat light_position[] = {135.66f, 129.83f, 4.7f, 1.0f};
glShadeModel(GL_SMOOTH);
glEnable(GL_LIGHT0);
glEnable(GL_COLOR_MATERIAL);
glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient);
glLightfv(GL_LIGHT0, GL_POS...
I'm new to OpenGL and it is overwhelming.
I'm playing with GLImageProcessing sample from Apple. It has few image
processing filters like brightness, contrast and hue etc.
Each time when I apply a filter, it starts all over instead of
starting from previously applied filter.
Any ideas? How do I save the modified texture or framebuff...
I am fairly new to openGL. I have a 3d game that I have running, and it seems to go fairly well. What I would like to do is display an image straight onto the screen, and I am not sure the easiest way to do that. My only idea is to draw a rectangle right in front of the screen and use the image as the texture. It seems like there should ...
Hello,
I am trying to create lomo fisheye effect on an image using openGL. I am new to openGL, should I use cube mapping and fisheye projection? Is there any open source that I can refer to? Thanks.
...
I'm trying to run a GLSL example, but I can't.
The error is in the line glGetShaderiv(vShader, GL_COMPILE_STATUS, &status); where the program exits. vShader is the file vPhong.glsl.
The error returned is:
0(18) : error C0000: syntax error, unexpected $undefined at token "<undefined>"
0(18) : error C0501: type name expected at token "<...