Advertisement

Textures with other size than 64x64 / 128x128

Started by January 30, 2001 07:22 AM
12 comments, last by Biberpelztrompete 23 years, 9 months ago
Umm,
in the Delphi conversion it isn''t. Only in version 1.2 or sth. like that.
Biberpelztrompete,
You will have to make the external function call yourself in the declarations portion of your unit. If you look at several of NeHe''s tuts you will notice he makes calls like this:

procedure glBindTexture(target: GLenum; texture: GLuint); stdcall; external ''OpenGL32.dll'';

You can do this yourself because the function is inside the opengl32.dll, it''s just not declared in the Delphi header conversion. You can download Mike-Liscke''s opengl12.pas if you want a current header, but declaring the function yourself is easy.

procedure glTexSubImage2D(target: GLEnum; level, xoffset, yoffset: GLint; width, height: GLsizei; format, atype: GLEnum; pixels: Pointer); stdcall; external ''OpenGL32.dll'';

Jason
Advertisement
quote: Original post by Biberpelztrompete

Hiho,
I want to make a layer that is above all the game screen. This Bitmap is needed to control the game. Building houses, menu and some other buttons are on it.
So it has be as wide as the screen and about 100 pixel high.
--> 128*1024. But making 4 Quads and putting a textures with that HUGE size will slow down the game or doesn''t it ?
And where''s the difference between a MipMap and a Bitmap ??


mipmap is a collection of bitmap. bitmap is a simple 2d-imagen without nothing more that colors and in some cases a alpha component.

mipmap is used to draw a diferent bitmap in some cases.. In fact, you can draw a 256x256 bitmaps when the object is near to camera, or use a 16x16 bitmaps when the object is far to camera.

If you let, that opengl transform you bitmaps from non-power-2 to power-2, then you lost some performance.. is better that transform before to power-2


-----------------------------------------------"Cuando se es peon, la unica salida es la revolución"
Aha !!
I downloaded the OpenGL 1.2 from www.delphi-jedi.com. And it works. Thanx guys ...

This topic is closed to new replies.

Advertisement