I'm writing a MS paint-like application (I'm not allowed to use opengl primitives). So far it only draws lines and points. I don't understand why when rendering a single point on click this code prints it where it should, based on the transformation on the renderPoint function:
void renderPoint(double x, double y)
{
W = glut...
I'm working a MS paint-like application on OpenGL using Bresenham's midpoint algorithm as homework. So far I can draw lines and ellipses. I lose them all when resizing the window. How can I keep them drawn?
Full code:
#include "GL/glut.h"
#include <stdio.h>
#include <math.h>
int i;
//int mainWindow, subWindow;
int X1, Y1, X2, Y2;
in...
I am using a timer function to animate, but I am having issues when I place it in the Renderer class.
void Renderer::animate(int value)
{
glutTimerFunc(TIMERMSECS, animate, 0);
}
Error:
\renderer.cpp(242) : error C3867: 'Renderer::animate': function call missing argument list; use '&Renderer::animate' to create a pointer to member
...
I am trying to use Glut in C++, but I am having issues when I try to put my display function within the Renderer class.
The error i have is:
error C2227: left of '->display' must point to class/struct/union/generic type
So far I have the following :
class Renderer
{
public:
Renderer *gRenderer;
...
}
int Renderer::start(Rendere...
Glut seems rather old, and SDL also as if it's not the youngest anymore - what is being used as (cross-platform) window manager for OpenGL nowadays?
...
Hi I have made a game and I have used OpenGL for its graphics.the OS is ubuntu 10.04.
The only thing left is to make a user interface so as to directly receive the requisite inputs from the user rather than from the terminal.
Can sm1 please tell me any good links to go to !!!!or any software that can ease my work !
thnx.
...
Hi I have made a game and I have used OpenGL for its graphics.the OS is ubuntu 10.04.
The game is multiplayer.For its testing I am unable to find any tool/software for low bandwidth and high latency.I mean I want to find the appropriate network conditions so as to run my game !
Can sm1 please tell me any good links to go to !!!!or any s...
Hi.
I want to pass Resize method of my Foo class object as the argument of glutReshapeFunc() but I get that error.
How should I pass it?
This is my definition of Resize:
class Foo{
public:
void Resize(int w, int h);
...
}
and this is how I try to call it
glutReshapeFunc(foo->Resize);
It was ok when foo was not a pointe...
On a MAC OS X machine, I am using FBO, depth RBO and texture RBO with freeglut to render a 3D scene to FBO and doing a render to texture. All using standard glut functions and glutMainLoop at the end.
I am using glReadPixels to read from the FBO. I can see that the pixels are being read correctly.
However When I hide the glut window us...
I'm reading the sample code for the bezier curve on the online version of opengl's tutorial.
I'm curious about how is resize being handled in the example cause I figure I might use it on my own version of this program , I placed my questions on its comments:
void reshape(int w, int h)
{
glViewport(0, 0, (GLsizei) w, (GLsizei) h); ...