you don't have to specify the vertex/color/texture/index pointers every frame.
just call glDrawElements.
if your indexes are in consecutive order (0, 1, 2, 3, 4, 5, ...) like for tri-strips or...
Type: Posts; User: Tron
you don't have to specify the vertex/color/texture/index pointers every frame.
just call glDrawElements.
if your indexes are in consecutive order (0, 1, 2, 3, 4, 5, ...) like for tri-strips or...
according to the opengl standard you either must generate no mipmaps or all down to 1x1.
everything else may cause 'undefined beahvior' (;
this is not completly true, in fact w IS a fourth dimension (but no one - at least no human - is able to imagine a fourth spatial dimension)
by dividing x, y and z by w you actually project this 4d...
this is a simple perspective projection matrix:
A 0 0 0
0 B 0 0
0 0 C D
0 0 1 0
A = 1.0 / Aspect
B = 1.0
C = (Far + Near) / (Far - Near)
D = -2.0 * Far * Near / (Far - Near)
did you initialize a valid render context and made it current?
@Bob:
normal FOV is 90 degree, so 60 degree is pretty distorted and zoomed
@transnept:
the limit is < 180, cause the matrix is generated with tan(FOV / 2) and tan(90) is undefiend
this is absolutely NO openGL related question... next time post in a general coding forum or better read a FAQ
every (console) program must have a main() function, it's the entry point of the...
(int)(FloatNumber + 0.5f)
this is exactly the what fov does: zooming (ever played quake? try 'fov' in the console)
the normal value for fov is 90 degree
smaller values zoom in, larger values zoom out
i tested this in...
in fact it is not a string ("MB"), it's a a 2 byte charachter literal ('MB')
but this is NOT portable! e.g. try it with MinGW and it will fail, because MinGW compiles this the other way round, so...
jup, it's an alignment problem, you read th bytes 4 till 7 instead of 2 till 5
the bytes are:
xx xx 07 00 00 00
the first 4 are the size (the 07 00 result from the about 465k file size) the...
eh? zomming has nothing to do with the clipping planes!
this is the matrix: (perspective, lefthanded, postmultiplied)
A 0 0 0
0 B 0 0
0 0 C D
0 0 1 0
A = 1.0 / tan(Angle / 2.0 / 180.0 *...
it's the same, they're just typedefs
per definition it's
0 4 8 12
1 5 9 13
2 6 10 14
3 7 11 15
post-multiplied
not really an OpenGL question...
you selected the wrong type of project, try 'win32 application' or something like that(not console)
include the windows.h BEFORE GL/gl.h
the CDS_FULLSCREEN flag is used to remove the taskbar (otherwise it would be displayed over your 'fullscreen' window)
[This message has been edited by Tron (edited 11-21-2001).]
[This message has been edited by Tron (edited 11-22-2001).]
the only width which is guaranteed is 1.0
support for other is implemantation depedent
ROFLNSC
you have absolutely NO idea what you're trying to do...
do you set glPixelStorei(GL_PACK_ALIGNMENT, 1)? if not every line is word-aligned!
for comparison check out my screenshot code, which just generates a 24bit RGB raw-file
[This message has...
@chowe6685:
there IS a LoadIdentity...
@huangzl99:
is that the whole code?
you MUST have an active OpenGL rendering context to issue ANY OpenGL commands (even glGetString)
programming OpenGL in VB is like placing a 40hp engine into a Ferrari chassis :D
if you have a header file you can prevent it from beeing included multiple times (and generating multiple-declaration errors) by using a sentry.
checks if this token is defined, if not processes...
btw: this is technique called: sentry
you should use it in all your header files, e.g.:
(cSomeClass.h)
#ifndef cSomeClass_h
#define cSomeClass_h
// your code here
#endif