Open GL question
-
- Insane DCEmu
- Posts: 290
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Wed Oct 17, 2001 7:44 pm
- Has thanked: 0
- Been thanked: 0
Open GL question
DOes anyone know how to wrap a texture around a polygon( maybe a triangle or a quad) in kos open gl? Please
"So I gotta be carefull, can't let tha evil of tha money trap me
so when ya see me #@#$%
ya better holla at me "
Tupac Shakur[1971-1996]
Makaveli[1996-????]
so when ya see me #@#$%
ya better holla at me "
Tupac Shakur[1971-1996]
Makaveli[1996-????]
-
- Insane DCEmu
- Posts: 290
- Joined: Wed Oct 17, 2001 7:44 pm
- Has thanked: 0
- Been thanked: 0
Thats what my question is about, it is loaded quite differently. This is one of the couple of bottlenecks of implementing open gl in my libGPU library file
Any suggestions would be great
Any suggestions would be great
"So I gotta be carefull, can't let tha evil of tha money trap me
so when ya see me #@#$%
ya better holla at me "
Tupac Shakur[1971-1996]
Makaveli[1996-????]
so when ya see me #@#$%
ya better holla at me "
Tupac Shakur[1971-1996]
Makaveli[1996-????]
-
- DC Developer
- Posts: 9951
- Joined: Sun Dec 30, 2001 9:02 am
- Has thanked: 0
- Been thanked: 1 time
I see...
You have to upload the textures yourself. First, you have to allocate some space with pvr_mem_malloc. Once that's done, you have to upload the texture data yourself, and the pass that information, along with any texture paramaters to GL.
Uploading it - the simplest way to upload raw data is by copying it manually. This is also the slowest way. Store Queues are faster, but DMA is faster still. I think you could probably use the pvrdma library to transfer textures to VRAM, provided they don't need to be converted to a different format first. You won't need to twiddle the textures, I assume, since the PSX doesn't use bilinear filtering.
You have to upload the textures yourself. First, you have to allocate some space with pvr_mem_malloc. Once that's done, you have to upload the texture data yourself, and the pass that information, along with any texture paramaters to GL.
Uploading it - the simplest way to upload raw data is by copying it manually. This is also the slowest way. Store Queues are faster, but DMA is faster still. I think you could probably use the pvrdma library to transfer textures to VRAM, provided they don't need to be converted to a different format first. You won't need to twiddle the textures, I assume, since the PSX doesn't use bilinear filtering.
- Covar
- DCEmu Mega Fan
- Posts: 2990
- Joined: Sat Nov 30, 2002 8:06 am
- Location: Cary, NC
- Has thanked: 0
- Been thanked: 0
- Contact:
sorry to ask this as its probably a big noob question but, I was working on the first NeHe tutorial for windows, and when I compiled i recieved 54 errors and 23 warnings, the errors i get are ones like "GLFLOAT undeclared Identifier" and stuff like that. so i was wondering is that because i need to download OpenGL, because i had the files he said to link to in my compiler directory. or is the code just wrong and i need to learn somewhere else?
Please Help! Thank You.
Please Help! Thank You.
-
- DC Developer
- Posts: 9951
- Joined: Sun Dec 30, 2001 9:02 am
- Has thanked: 0
- Been thanked: 1 time
You need the OpenGL headers and libraries. All those errors mean that you either haven't included the header files, or you don't have them. If you don't have them, the first error message will be something like "Can't open header file gl/gl.h"
NeHe's tutorials do work though, if you've got your compiler/libs/headers set up right.
NeHe's tutorials do work though, if you've got your compiler/libs/headers set up right.
The data type is GLfloat not GLFLOAT so that could be one and yes you need to download the OpenGL libraries. If your running linux do a search for Mesa3d on google. Also if you have the libraries make sure your linking them in the compilter -lGL -lGLU -lglut I think those are the linkers for gcc.
As BlackAura Mentioned as well the header files should appear like this in your source file
If your still getting errors try to add this to the compiler line (providing your using linux like myself)
-lX11 -lXi -lXmu -lglut -lGL -lGLU -lm
As BlackAura Mentioned as well the header files should appear like this in your source file
Code: Select all
#include <GL/glut.h>
#include <GL/gl.h>
#include <GL/glu.h>
...
-lX11 -lXi -lXmu -lglut -lGL -lGLU -lm