Search found 35 matches

by Megaborsti
Sun Nov 21, 2004 2:05 am
Forum: Announcement
Topic: PureBasic Bindings for GameVision SDK 2
Replies: 12
Views: 4202

I think PB procedures use STDCALL by default, because PB´s CallFunction() uses STDCALL and you can call the PB procedures of your own code with CallFunction() without loading an external dll 8) . Think about it :wink:
by Megaborsti
Sun Nov 14, 2004 12:22 pm
Forum: Coding Questions
Topic: Global variables
Replies: 4
Views: 1309

ok :( thx
by Megaborsti
Sun Nov 14, 2004 12:14 am
Forum: Coding Questions
Topic: Global variables
Replies: 4
Views: 1309

Global variables

hi,
just a short question:
Is it possible to make all variables global, or at least every variable declared outside a procedure (ie. like delphi does).

[I use LOTS OF variables in my code and usually structure it with procedures (I thought about gosubs, but I use a windows callback procedure and ...
by Megaborsti
Wed Feb 25, 2004 1:41 pm
Forum: Game Programming
Topic: VertexShader with directX in pb
Replies: 15
Views: 9556

Darklordz now has uploaded my DX-pack.zip (headers, libraries, DLLs, examples, sources, ...)

You can download it at:
http://www.balpoint.com/files/DX-pack.zip

Good luck

(For more information, see my topic in tips´n´tricks)
by Megaborsti
Tue Feb 24, 2004 8:50 pm
Forum: Game Programming
Topic: VertexShader with directX in pb
Replies: 15
Views: 9556

I have finally created a DirectX-zip-file, containing the header-files from codemonger, my PB-Libraries and the matching DLLs, and four examples in different difficulties for beginners (one of these examples is my working translation of coma´s c++ example).
Because I have no webspace myself, I ...
by Megaborsti
Mon Feb 23, 2004 11:33 am
Forum: Game Programming
Topic: VertexShader with directX in pb
Replies: 15
Views: 9556

Here is my solution (it isn´t really difficult if you think about it a bit):



; The Codemonger Include Files
IncludeFile "D3D9.pbi"
IncludeFile "D3D9Interface.pbi"

; Setting Global variables
Global *D3D.IDirect3D9
Global *D3DDevice.IDirect3DDevice9
Global *D3DVS.IDirect3DVertexShader9
Global ...
by Megaborsti
Sun Feb 22, 2004 1:30 pm
Forum: Coding Questions
Topic: Some questions about dlls and interfaces
Replies: 0
Views: 921

Some questions about dlls and interfaces

Hi,
I hope you can answer the following questions:

1. I know how to create a dll, but how do I use it in c++ (or any other language)?

2. How do I build dlls in c++, so that I can use them in purebasic?

3. Say I have coded a class in c++. What do I have to do to use that class as an interface in ...
by Megaborsti
Tue Jan 06, 2004 8:04 pm
Forum: Game Programming
Topic: CollisionDetection on Sprite3Ds
Replies: 1
Views: 1575

ok,
I tried the slow way because I had no other idea :roll: , but it seems that it is not possible to render sprite3Ds to 2dsprites!? 8O
The following code shows the problem: Displaysprite3d() seems to render on the backbuffer instead of on the sprite.



InitSprite()
InitSprite3D()
InitKeyboard ...
by Megaborsti
Tue Jan 06, 2004 11:32 am
Forum: Game Programming
Topic: CollisionDetection on Sprite3Ds
Replies: 1
Views: 1575

CollisionDetection on Sprite3Ds

Hi,
does anyone know how to use CollisionDetection with rotatet (or zoomed) sprite3ds? (without displaying them on 2d-sprites and collisiondetect them?)
My problem is, that I want to move,zoom and rotate sprite3ds (when I move the mouse and/or use keyboard) and then collisiondetect them.
I know that ...
by Megaborsti
Thu Jan 01, 2004 5:00 am
Forum: Game Programming
Topic: VertexShader with directX in pb
Replies: 15
Views: 9556

Ok, I updated my code a bit, it now crashes much later :?
This time without comments (not much changed):



IncludeFile "D3D9.pbi"
IncludeFile "D3D9Interface.pbi"

OpenLibrary(0,"D3D9.DLL")
OpenLibrary(1,"D3DX9.dll")

Dim dwVertexShader.l(11)
dwVertexShader(0) = $fffe0101
dwVertexShader(1 ...
by Megaborsti
Tue Dec 30, 2003 1:46 pm
Forum: Game Programming
Topic: VertexShader with directX in pb
Replies: 15
Views: 9556

Ok, the dx8-function was the problem, thanks codemonger.
I finally downloaded the dx9sdk and translated the example.

If I try to run it, it crashes at the LOCK-function.
I hope someone (codemonger) can find the bug.

I have not commented much, post if you need help.


; Codemonger-files ...
by Megaborsti
Tue Dec 30, 2003 1:14 pm
Forum: Game Programming
Topic: opengl or directx
Replies: 4
Views: 2409

I tried both and prefer DirectX.
I may be a bit complex to learn but OpenGL isn´t much easier. If learned it, the Syntax of DirectX is easy to understand and use (I hate the OpenGL syntax).
If you want to work on many or bigger projects, I think DirectX is a good solution because the DirectXSDK has ...
by Megaborsti
Wed Dec 24, 2003 12:36 pm
Forum: Game Programming
Topic: VertexShader with directX in pb
Replies: 15
Views: 9556

58 Views, but nobody anwered, thats not good :?

After all, I searched the last two days to find a way to use the vertexshader and there is only 1 problem left.

The following line of code does not work:


D3DDevice\Createvertexshader(dwDecl(0), dwVertexShader(0), ?, 0) ;


That is written in ...
by Megaborsti
Mon Dec 22, 2003 4:01 pm
Forum: Game Programming
Topic: VertexShader with directX in pb
Replies: 15
Views: 9556

VertexShader with directX in pb

Hi,
it is now possible to use DirectX directly in PureBasic (you can download the needed include-files and read some examples in codemonger´s forum: http://www.codemonger.com/Forum/default.asp (thanks, codemonger)).

I already have some experience in Direct3D and tried the last week to translate ...
by Megaborsti
Sat Dec 13, 2003 12:00 pm
Forum: Coding Questions
Topic: Looping MIDI and Mp3
Replies: 16
Views: 3968

If you would know, how long your movie is (... the movielength()-command works only with real movies, not with midi or something), you could start the movie again after that time


length = [that long is the movie in millisecs]

start = gettickcount_()
playmovie()

Repeat
IF gettickcount ...