Search found 732 matches

by Landeel
Nov 20, 2007 22:42
Forum: Beginners
Topic: Shared or reallocating : Wich is faster?
Replies: 13
Views: 3116

Shared or reallocating : Wich is faster?

So my program calls a sub a few hundred times per second to perform some calculations.
I don't know if it's better to dim shared my variables in the main module, or to dim it inside the sub every time it is called. Which is faster?
by Landeel
Oct 10, 2007 20:40
Forum: General
Topic: freeBASIC as cross compiler ?
Replies: 5
Views: 2472

My OS is Linux. I can easily compile for Windows target using WINE (http://www.winehq.com) + FBC for windows.

Of course, development is much easier in the OS you're developing for.
Unless you program cell phones. :-P

LOL
by Landeel
Sep 24, 2007 18:57
Forum: Projects
Topic: Linux freebasic syntax highlighting with Kate & Co
Replies: 2
Views: 2373

Sounds good.
I'm using Scite ATM. I'll try it.
by Landeel
Sep 24, 2007 18:45
Forum: Beginners
Topic: ALPHA channel problem with FBPNG and CREATETEX.BI
Replies: 13
Views: 3038

I really needed to convert it to FB.Image before uploading the texture. It's working as expected now. Thanks.
by Landeel
Sep 21, 2007 20:14
Forum: Beginners
Topic: ALPHA channel problem with FBPNG and CREATETEX.BI
Replies: 13
Views: 3038

Wow, it works. Problem solved.
Thanks a lot!!!!!
by Landeel
Sep 20, 2007 16:02
Forum: Beginners
Topic: ALPHA channel problem with FBPNG and CREATETEX.BI
Replies: 13
Views: 3038

Yeah, but only with TGA files or the masking technique.
If I find another way to turn a FB.Image with alpha channel in a texture with alpha channel, it will solve my problem.
by Landeel
Sep 19, 2007 17:16
Forum: Community Discussion
Topic: GCC Coming Soon?
Replies: 7
Views: 4134

Can it be used to port to other patforms?
I'm waiting for an AMD64 Linux port.
by Landeel
Sep 19, 2007 15:42
Forum: Beginners
Topic: ALPHA channel problem with FBPNG and CREATETEX.BI
Replies: 13
Views: 3038

The CreateTexture function already swaps the channel, as the colors show up right. The problem is that after uploading, the alpha channel in not in the texture.
by Landeel
Sep 19, 2007 2:32
Forum: Beginners
Topic: ALPHA channel problem with FBPNG and CREATETEX.BI
Replies: 13
Views: 3038

createtex.bi is inside NeHe's examples. Sure it helps. If we upload it directly with PNG_TARGET_OPENGL, the alpha information goes fine. Thanks a lot. But what if I need to change the image before uploading? I still need to load it as FB.Image buffer before uploading, and my alpha channel gets lost....
by Landeel
Sep 19, 2007 0:33
Forum: Beginners
Topic: ALPHA channel problem with FBPNG and CREATETEX.BI
Replies: 13
Views: 3038

#include once "GL/gl.bi" #include once "GL/glu.bi" #include once "fbgfx.bi" #include once "createtex.bi" #include once "fbpng.bi" #include once "png_image.bi" #define RGBA_R(x) ((x) Shr 16 And 255) #define RGBA_G...
by Landeel
Sep 19, 2007 0:10
Forum: Beginners
Topic: ALPHA channel problem with FBPNG and CREATETEX.BI
Replies: 13
Views: 3038

ALPHA channel problem with FBPNG and CREATETEX.BI

I'm trying to make a sprite based game with OpenGL. I want to load a PNG image with FBPNG, and then make a texture with CREATETEX.BI When I load the PNG, the alpha information gets loaded okay in my buffer. But for some reason when I use the CreateTexture function, my alpha data gets lost and the te...
by Landeel
Sep 18, 2007 18:59
Forum: Beginners
Topic: OpenGL textures and keycolor
Replies: 2
Views: 1010

Yeah, good idea. Just what I needed. Thanks a lot.
by Landeel
Sep 18, 2007 16:02
Forum: Beginners
Topic: OpenGL textures and keycolor
Replies: 2
Views: 1010

OpenGL textures and keycolor

I am developing a sprite based game using OpenGL and FreeBASIC.
What is the easiest way to configure a texture so pixels of a certain color (say FF 00 FF) are not drawn?
by Landeel
Jul 02, 2007 19:41
Forum: Tips and Tricks
Topic: IncFile() and IncArray() macros [Updated 22-1-2009]
Replies: 88
Views: 44665

This is very useful. Thanks a lot!
But how do I retrieve the size of the inc file(s)?
(This is required to use with PNG_Load_mem)

EDIT:
Uh, sorry! Found it!
blahblah_len
by Landeel
Jun 04, 2007 19:17
Forum: Libraries
Topic: What about a VERY SIMPLE 3D-gfx library?
Replies: 19
Views: 8148

OpenGL is not hard at all. I bought a book "Introduction to OpenGL", and in two weeks I was programming a game in OpenGL. "OpenGL is a state machine"... Drawing with OpenGL is very similar to drawing with the old "DRAW" command from QB. Except it works in 3D. :) You may want to check NeHe' s example...

Go to advanced search